{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/b97tsk/rx","name":"github.com/b97tsk/rx","description":"Package rx is a reactive programming library for Go, inspired by\nhttps://reactivex.io/ (mostly RxJS).\n\nAn Observer is a consumer of notifications delivered by an Observable.\n\nAn Observer is usually created and passed to Observable.Subscribe method\nwhen subscribing to an Observable.\n\nAn Observable is a collection of future values, waiting to become a flow\nof data. Subscribing an Observer to an Observable makes it happen.\nWhen an Observable is subscribed, its values, when available, are emitted\nto a given Observer.\n\nThere are four kinds of notifications:\n\nBoth Error notifications and Stop notifications carry an error value.\nThe main differences between them are as follows:\n\nAn Operator is an operation on an Observable. When applied, they do not\nchange the existing Observable value. Instead, they return a new one,\nwhose subscription logic is based on the first Observable.\n\nThere are many kinds of Operators in this library.\nHere is a list of what Operators can do:\n\nPreviously, Operator was also a function type like Observable and\nObserver. It was changed to be an interface type for one reason:\nimplementations can carry additional methods for setting extra options.\nFor example, MergeMap has two extra options:\nMergeMapOperator.WithBuffering and MergeMapOperator.WithConcurrency,\nand this is how they are specified when using a MergeMap:\n\nTo chain multiple Operators, do either this:\n\nor this:\n\nThere are 9 Pipe functions in this library, from Pipe1 to Pipe9.\nFor different number of Operators, use different Pipe function.\n\nWhen there are really too many Operators to chain, do either this:\n\nor this:\n\nThere are 8 Compose functions in this library, from Compose2 to\nCompose9.\n\nNotifications emitted by an Observable may come from any started\ngoroutine, but they are guaranteed to be in sequence, one after another.\n\nOperators in a chain may run in different goroutines.\nIn the following code:\n\nRace conditions could happen for any two of ob, op1, op2, op3 and o.\n\nRace conditions could also happen for any two Observables, however, not\nevery Operator or Observable has concurrent behavior.\n\nThe following operations may cause concurrent behavior:\n\nThe following operations may cause concurrent behavior due to Context\ncancellation:\n\nSince Context cancellations are very common in this library, and that\na Context cancellation usually results in a Stop notification, emitted\nin a goroutine started by Context.AfterFunc or Context.Go, handling\nStop notifications must take extra precaution. The problem is that,\nStop notifications are not deterministic. They may just come from random\ngoroutines. If that happens, one would have to deal with race conditions.\n\nIt's very common that an Observable, when subscribed, also subscribes to\nother Observables.\nIn this library, inner Observables are usually subscribed in the same\ngoroutine where the outer one is being subscribed. However,\n\nWhen in doubt, read the code.\n\n\n\nMulticasts and Unicasts are special Observables that developers can decide\nwhat values they produce or when they complete, later after they are subscribed.\nMulticasts can be subscribed multiple times, whereas Unicasts can only be\nsuccessfully subscribed once.\nBoth Multicasts and Unicasts are safe for concurrent use.\nHere is an example demonstrates how to use a Unicast.","version":"v0.10.0","softwareVersion":"v0.10.0","license":"https://spdx.org/licenses/MIT","codeRepository":"https://github.com/b97tsk/rx","issueTracker":"https://github.com/b97tsk/rx/issues","url":"https://github.com/b97tsk/rx","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateCreated":"2020-04-14","dateModified":"2024-08-13","datePublished":"2024-08-13","copyrightYear":2020,"downloadUrl":"https://proxy.golang.org/github.com/b97tsk/rx/@v/v0.10.0.zip","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/b97tsk/rx#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/b97tsk/rx"],"https://www.w3.org/ns/activitystreams#likes":4,"https://forgefed.org/ns#forks":1}