### Install samber/ro Library Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Installs the samber/ro library using the Go package manager. Requires Go 1.18+. ```bash go get -u github.com/samber/ro ``` -------------------------------- ### Create Observables from Values and Slices in Go Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Shows how to create Observables in Go. The first example creates an observable from a sequence of integer values, and the second creates an observable from a slice of strings. ```go // Create from values numbers := ro.Just(1, 2, 3, 4, 5) // Create from a slice letters := ro.FromSlice([]string{"a", "b", "c"}) ``` -------------------------------- ### Composable Pipeline Operators in ro Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Illustrates the best practice of using pipeline operators in the ro framework for clean and reusable code. This example shows creating a composable pipeline with filter, map, and retry operations that can be applied to multiple streams. ```go // Good: Composable pipeline pipeline := ro.Pipe3( source, ro.Filter(predicate), ro.Map(transformer), ro.Retry(3), ) // Reusable pipeline result1 := pipeline(stream1) result2 := pipeline(stream2) ``` -------------------------------- ### Install ro/plugins/strings Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/strings.md Installs the 'strings' sub-package of the ro library using go get. This command fetches and installs the specified package and any dependencies. ```bash go get -u github.com/samber/ro/plugins/strings ``` -------------------------------- ### Install Zerolog Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/observability/zerolog/README.md Installs the Zerolog plugin for the 'ro' library using go get. This command fetches and installs the necessary package for integrating Zerolog with 'ro' observables. ```bash go get github.com/samber/ro/plugins/observability/zerolog ``` -------------------------------- ### Install ro Time Plugin Source: https://github.com/samber/ro/blob/main/plugins/time/README.md Installation command for the ro time plugin using go get. ```bash go get github.com/samber/ro/plugins/time ``` -------------------------------- ### RangeWithStep Go Fractional Example Source: https://github.com/samber/ro/blob/main/docs/data/core-rangewithstep.md Illustrates using RangeWithStep with fractional start, end, and step values. This example shows how to generate a sequence of floating-point numbers with a non-integer step. ```go obs := ro.RangeWithStep(0.5, 2.5, 0.5) sub := obs.Subscribe(ro.PrintObserver[float64]()) def sub.Unsubscribe() // Next: 0.5 // Next: 1 // Next: 1.5 // Next: 2 // Next: 2.5 // Completed ``` -------------------------------- ### Install samber/psi plugin Source: https://github.com/samber/ro/blob/main/plugins/samber/psi/README.md Installs the samber/psi plugin using the go get command. This is the initial step to integrate PSI monitoring into your project. ```bash go get github.com/samber/ro/plugins/samber/psi ``` -------------------------------- ### Install Base64 Encoding Plugin Source: https://github.com/samber/ro/blob/main/plugins/encoding/base64/README.md Installs the base64 encoding plugin for the samber/ro library using go get. ```bash go get github.com/samber/ro/plugins/encoding/base64 ``` -------------------------------- ### Install Signal Plugin Source: https://github.com/samber/ro/blob/main/plugins/signal/README.md Installs the signal plugin for the ro library using go get. This command fetches and installs the specified package and its dependencies. ```bash go get github.com/samber/ro/plugins/signal ``` -------------------------------- ### Install HyperLogLog Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/hyperloglog/README.md Installs the HyperLogLog plugin for the ro reactive streams library using go get. This command fetches and installs the necessary package. ```bash go get github.com/samber/ro/plugins/hyperloglog ``` -------------------------------- ### Install ro ratelimit/native plugin Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/ratelimit-native.md This command installs the native ratelimit plugin for the ro library. It uses the go get command to download and install the specified package. ```bash go get -u github.com/samber/ro/plugins/ratelimit/native ``` -------------------------------- ### Hot Observables Creation and Subscription in ro Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Demonstrates how to create and manage hot observables using the ro framework. It shows converting a cold observable to a hot one and how multiple subscribers share the same stream, with execution starting after calling Connect(). ```go // Create a hot observable from a cold one hot := ro.Connectable(ro.Just(1, 2, 3)) // Both subscribers share the same sequence simultaneously sub1 := hot.Subscribe(ro.OnNext(func(x int) { fmt.Println("Sub1:", x) })) sub2 := hot.Subscribe(ro.OnNext(func(x int) { fmt.Println("Sub2:", x) })) // Start subscription subscription := connectable.Connect() ``` -------------------------------- ### Install Ozzo Validation Plugin Source: https://github.com/samber/ro/blob/main/plugins/ozzo/ozzo-validation/README.md Installs the ozzo-validation plugin for reactive streams using go get. This command fetches and installs the necessary package. ```bash go get github.com/samber/ro/plugins/ozzo/ozzo-validation ``` -------------------------------- ### Install Testify Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/testify/README.md Installs the testify plugin for the ro reactive streams library using go get. This command fetches and installs the necessary package to enable testify-based testing utilities. ```bash go get github.com/samber/ro/plugins/testify ``` -------------------------------- ### Install Samber RO Template Plugin Source: https://github.com/samber/ro/blob/main/plugins/template/README.md Installs the template plugin for the Samber RO library using go get. ```bash go get github.com/samber/ro/plugins/template ``` -------------------------------- ### Install Testify Plugin for Go Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/testify.md This snippet shows how to install the testify sub-package for Go projects using the go get command. This is a prerequisite for using the testify operators. ```bash go get -u github.com/samber/ro/plugins/testify ``` -------------------------------- ### Install Proc Plugin Source: https://github.com/samber/ro/blob/main/plugins/proc/README.md Installs the Proc plugin for the ro project using go get. This command fetches the necessary package to integrate system resource monitoring capabilities. ```bash go get github.com/samber/ro/plugins/proc ``` -------------------------------- ### Install HTTP Client Plugin Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/http-client.md Installs the HTTP client plugin for the ro project using go get. This command fetches the latest version of the plugin and makes it available for import in your Go project. ```bash go get -u github.com/samber/ro/plugins/http/client ``` -------------------------------- ### Install strconv Sub-package (Go) Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/strconv.md This snippet shows how to install the strconv sub-package using go get. It is a prerequisite for using the string conversion utilities. ```bash go get -u github.com/samber/ro/plugins/strconv ``` -------------------------------- ### Install Strings Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/strings/README.md Installs the strings plugin for the ro reactive streams library using go get. ```bash go get github.com/samber/ro/plugins/strings ``` -------------------------------- ### Install HTTP Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/http/client/README.md Installs the HTTP plugin for the ro reactive streams library using go get. ```bash go get github.com/samber/ro/plugins/http ``` -------------------------------- ### Install ro/plugins/template Package Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/template.md Instructions to install the template sub-package for the ro project using go get. This command fetches the latest version of the package and its dependencies. ```bash go get -u github.com/samber/ro/plugins/template ``` -------------------------------- ### Install Regexp Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/regexp/README.md Installs the Regexp plugin for the ro library using go get. This is a prerequisite for using the regular expression operators. ```bash go get github.com/samber/ro/plugins/regexp ``` -------------------------------- ### Install Samber Hot Plugin for Go Source: https://github.com/samber/ro/blob/main/plugins/samber/hot/README.md Installs the samber/hot plugin for Go using the go get command. This is the initial step to integrate hot caching capabilities into your Go project. ```bash go get github.com/samber/ro/plugins/samber/hot ``` -------------------------------- ### Install encoding/xml Package (Go) Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/encoding-xml.md Installs the encoding/xml sub-package for Go projects using the go get command. This is the first step to using the XML encoding and decoding utilities. ```bash go get -u github.com/samber/ro/plugins/encoding/xml ``` -------------------------------- ### Install samber/psi Go Package Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/samber-psi.md This snippet shows how to install the samber/psi sub-package using the go get command. This is the first step to using the performance monitoring and system metrics utilities in your Go project. ```bash go get -u github.com/samber/ro/plugins/samber/psi ``` -------------------------------- ### Install Log Observability Plugin Source: https://github.com/samber/ro/blob/main/plugins/observability/log/README.md Installs the log observability plugin for Go reactive streams using 'go get'. This is the initial step to enable logging capabilities for your streams. ```bash go get github.com/samber/ro/plugins/observability/log ``` -------------------------------- ### Install Proc Plugin for Go Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/proc.md This snippet shows how to install the 'proc' sub-package for Go projects using the go get command. This is the first step to using the process management utilities provided by the library. ```bash go get -u github.com/samber/ro/plugins/proc ``` -------------------------------- ### Install Ulule Rate Limiter Plugin for ro Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/ratelimit-ulule.md This snippet shows how to install the ulule/limiter rate limiting plugin for the ro project using go get. It's a prerequisite for using the advanced rate limiting features provided by this sub-package. ```bash go get -u github.com/samber/ro/plugins/ratelimit/ulule ``` -------------------------------- ### Go Code Example for ro Library Method Documentation Source: https://github.com/samber/ro/blob/main/docs/CLAUDE.md Demonstrates a typical Go code example used within ro library documentation. It shows how to use the `Pipe` function with `Just` and a placeholder `MethodName`, and how to subscribe to the observable with `PrintObserver`. ```go obs := ro.Pipe[int, int]( ro.Just(1, 2, 3, 4), ro.MethodName(example), ) sub := obs.Subscribe(ro.PrintObserver[bool]()) def sub.Unsubscribe() // expected result ``` -------------------------------- ### Create Custom Reusable Operators with ro Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Shows how to create custom, reusable operators in Go using the ro framework. This example defines a 'Square' operator that squares integer values, demonstrating encapsulation of common transformations. ```go // Custom operator that squares numbers func Square[T constraints.Integer](observable ro.Observable[T]) ro.Observable[T] { return ro.Map(func(x T) T { return x * x })(observable) } func main() { result := Square(ro.Just(1, 2, 3, 4, 5)) result.Subscribe(ro.OnNext(func(x int) { fmt.Println(x) // 1, 4, 9, 16, 25 })) } ``` -------------------------------- ### Quick Start: Reactive WebSocket Client in Go Source: https://github.com/samber/ro/blob/main/plugins/websocket/client/README.md Demonstrates creating a reactive WebSocket client using the Ro plugin. It sets up a connection, subscribes to messages, sends a message, and handles connection events. Requires Ro library and gorilla/websocket. ```go package main import ( "encoding/json" "fmt" "github.com/samber/ro" "github.com/samber/ro/plugins/websocket/client" ) func main() { // Create a WebSocket subject ws := rowebsocket.NewWebsocketSubject(rowebsocket.WebsocketSubjectConfig[string, string]{ URL: "ws://localhost:8080/ws", Serializer: func(msg string) ([]byte, error) { return json.Marshal(msg) }, Deserializer: func(data []byte) (string, error) { var msg string err := json.Unmarshal(data, &msg) return msg, err }, }) // Subscribe to incoming messages subscription := ws.Subscribe( ro.NewObserver( func(message string) { fmt.Printf("Received: %s\n", message) }, func(err error) { fmt.Printf("Error: %v\n", err) }, func() { fmt.Println("WebSocket closed") }, ), ) defer subscription.Unsubscribe() // Send a message ws.Next("Hello, WebSocket!") // Keep the application running select {} } ``` -------------------------------- ### Plugin Example - Capitalize Strings - Go Source: https://github.com/samber/ro/blob/main/docs/CLAUDE.md Demonstrates the usage of a string capitalization plugin within the samber/ro framework. It shows how to import and pipe a plugin operator. ```go import ( "github.com/samber/ro" rostrings "github.com/samber/ro/plugin/strings" ) obs := ro.Pipe[string, string]( ro.Just("hello world"), rostrings.Capitalize[string](), ) sub := obs.Subscribe(ro.PrintObserver[string]()) def sub.Unsubscribe() // Next: Hello world // Completed ``` -------------------------------- ### Quick Start: Create a Basic HTTP Server in Go Source: https://github.com/samber/ro/blob/main/plugins/http/server/README.md Demonstrates how to create a simple HTTP server using the Ro HTTP Server plugin. It sets up a server on port 8080 and defines a handler for GET requests to '/hello' that returns a reactive string observable. ```go package main import ( "fmt" "net/http" "github.com/samber/ro" "github.com/samber/ro/plugins/http/server" ) func main() { // Create a simple HTTP server server := rohttp.NewServer(":8080") // Handle GET requests to /hello server.HandleRoute("GET", "/hello", func(req *http.Request) ro.Observable[string] { name := req.URL.Query().Get("name") if name == "" { name = "World" } return ro.Just(fmt.Sprintf("Hello, %s!", name)) }) // Start the server if err := server.Start(); err != nil { panic(err) } } ``` -------------------------------- ### RangeWithStep Go Example Source: https://github.com/samber/ro/blob/main/docs/data/core-rangewithstep.md Demonstrates the basic usage of RangeWithStep to create an observable sequence of numbers with a positive step. It takes start, end, and step values as input and prints the emitted numbers until completion. ```go obs := ro.RangeWithStep(1, 10, 2) sub := obs.Subscribe(ro.PrintObserver[float64]()) def sub.Unsubscribe() // Next: 1 // Next: 3 // Next: 5 // Next: 7 // Next: 9 // Completed ``` -------------------------------- ### Start Local Development Server with Yarn Source: https://github.com/samber/ro/blob/main/docs/README.md Starts a local development server for the website. Changes are reflected live without requiring a server restart. Opens the site in a browser window. ```bash yarn start ``` -------------------------------- ### Install Slog Plugin for Go Source: https://github.com/samber/ro/blob/main/plugins/observability/slog/README.md Installs the slog plugin for the ro library using go get. This command fetches and installs the specified package and its dependencies. ```bash go get github.com/samber/ro/plugins/observability/slog ``` -------------------------------- ### Install samber/hot Plugin Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/samber-hot.md Installs the samber/hot in-memory cache library plugin for your project using go get. ```bash go get -u github.com/samber/ro/plugins/samber/hot ``` -------------------------------- ### Run Websocket Gateway (Go) Source: https://github.com/samber/ro/blob/main/examples/distributed-websocket-gateway/README.md This command initiates the distributed websocket gateway using Go. Ensure all Go files are in the current directory. The gateway listens for incoming websocket connections. ```bash go run *.go ``` -------------------------------- ### Install samber/oops Package Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/samber-oops.md This snippet shows how to install the samber/oops sub-package using the go get command. Ensure you have Go installed and configured in your project. ```bash go get -u github.com/samber/ro/plugins/samber/oops ``` -------------------------------- ### Install Ro Sort Plugin Source: https://github.com/samber/ro/blob/main/plugins/sort/README.md Installs the sort plugin for the Ro reactive streams library using go get. ```bash go get github.com/samber/ro/plugins/sort ``` -------------------------------- ### Install CSV Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/encoding/csv/README.md Installs the CSV plugin for the ro reactive streams library using go get. ```bash go get github.com/samber/ro/plugins/encoding/csv ``` -------------------------------- ### Install Ro HTTP Server Plugin Source: https://github.com/samber/ro/blob/main/plugins/http/server/README.md Installs the Ro HTTP Server plugin using the Go package manager. This command fetches and installs the necessary package for integrating reactive HTTP server capabilities. ```bash go get github.com/samber/ro/plugins/http/server ``` -------------------------------- ### Go ReplaySubject Example Source: https://github.com/samber/ro/blob/main/docs/docs/core/subject.md Shows how to use ReplaySubject in Go, which buffers a specified number of previous values and replays them along with subsequent values to new subscribers. This is useful for providing historical context to observers. ```go // Create a ReplaySubject with buffer size of 3 subject := ro.NewReplaySubject[string](3) // Emit values subject.Next("first") subject.Next("second") subject.Next("third") subject.Next("fourth") // Subscriber 1 - gets last 3 values subject.Subscribe(ro.OnNext(func(s string) { fmt.Println("Subscriber 1:", s) })) subject.Next("fifth") // Subscriber 2 - gets last 3 values subject.Subscribe(ro.OnNext(func(s string) { fmt.Println("Subscriber 2:", s) })) subject.Complete() // Output: // Subscriber 1: second // Subscriber 1: third // Subscriber 1: fourth // Subscriber 1: fifth // Subscriber 2: third // Subscriber 2: fourth // Subscriber 2: fifth // Subscriber 1: Completed // Subscriber 2: Completed ``` -------------------------------- ### API Rate Limiting and Retries with ro Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Illustrates a practical application of the ro framework for handling API calls with rate limiting and retry logic. It simulates fetching user data, applying delays between calls, and retrying failed requests up to a specified limit. ```go package main import ( "fmt" "net/http" "time" "github.com/samber/ro" ) func fetchUser(id int) (string, error) { // Simulate API call time.Sleep(100 * time.Millisecond) return fmt.Sprintf("user-%d", id), nil } func main() { // Create a stream of user IDs userIds := ro.Just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) // Process with rate limiting userStream := ro.Pipe3( userIds, ro.Map(fetchUser), ro.DelayEach[string](200 * time.Millisecond), // 200ms pause between items ro.RetryWithConfig(RetryConfig{MaxRetries: 2}), // Retry failed requests ) // Subscribe and collect results var results []string subscription := userStream.Subscribe(ro.NewObserver( func(user string) { results = append(results, user) fmt.Println("Fetched:", user) }, func(err error) { fmt.Println("Error:", err) }, func() { fmt.Println("All users fetched!") fmt.Println("Results:", results) }, )) // Wait for completion subscription.Wait() } ``` -------------------------------- ### Install Bytes Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/bytes/README.md Installs the Bytes plugin for the ro reactive streams library using go get. This command fetches and installs the necessary package to use the bytes operators. ```bash go get github.com/samber/ro/plugins/bytes ``` -------------------------------- ### Create and Subscribe to Host Info Watcher (Go) Source: https://github.com/samber/ro/blob/main/docs/data/plugin-proc-newhostinfowatcher.md This Go code snippet demonstrates how to initialize the NewHostInfoWatcher with a specific interval and subscribe to its emitted host system information. It utilizes the 'time' package for duration and the 'ro' and 'ro/plugins/proc' packages for the watcher functionality. The output includes detailed host statistics like hostname, uptime, and OS information. ```go import ( "time" "github.com/samber/ro" roproc "github.com/samber/ro/plugins/proc" ) obs := roproc.NewHostInfoWatcher(10 * time.Second) sub := obs.Subscribe(ro.PrintObserver[*host.InfoStat]()) def sub.Unsubscribe() // Next: &{Hostname: "my-server" Uptime: 86400 BootTime: 1640995200 Procs: 150 OS: "linux" ...} // Next: &{Hostname: "my-server" Uptime: 86410 BootTime: 1640995200 Procs: 152 OS: "linux" ...} // ... (continues every 10 seconds) ``` -------------------------------- ### Go BehaviorSubject Example Source: https://github.com/samber/ro/blob/main/docs/docs/core/subject.md Illustrates the BehaviorSubject in Go, which emits the last received value and all subsequent values to new subscribers. It requires an initial value and is useful for state management, ensuring new subscribers get the current state immediately. ```go // Create a BehaviorSubject with initial value subject := ro.NewBehaviorSubject(42) // Subscriber 1 - immediately gets the current value subject.Subscribe(ro.NewObserver( func(value int) { fmt.Println("Subscriber 1 received:", value) }, func(err error) { fmt.Println("Subscriber 1 error:", err) }, func() { fmt.Println("Subscriber 1 completed") }, )) // Emit new values subject.Next(100) subject.Next(200) // Subscriber 2 - immediately gets the latest value subject.Subscribe(ro.NewObserver( func(value int) { fmt.Println("Subscriber 2 received:", value) }, func(err error) { fmt.Println("Subscriber 2 error:", err) }, func() { fmt.Println("Subscriber 2 completed") }, )) subject.Next(300) subject.Complete() // Output: // Subscriber 1 received: 42 // Subscriber 1 received: 100 // Subscriber 1 received: 200 // Subscriber 2 received: 200 // Subscriber 1 received: 300 // Subscriber 2 received: 300 // Subscriber 1 completed // Subscriber 2 completed ``` -------------------------------- ### Configure Rate Limiter Interval (Go) Source: https://github.com/samber/ro/blob/main/plugins/ratelimit/native/README.md Illustrates setting the time window for rate limiting. Examples include per second, per minute, and per hour intervals, demonstrating flexibility in defining the rate. ```go import ( "time" "github.com/samber/ro" roratelimit "github.com/samber/ro/plugins/ratelimit/native" ) // 5 items per second observable := ro.Pipe1( ro.Just("item1", "item2", "item3", "item4", "item5"), roratelimit.NewRateLimiter[string](5, time.Second, func(item string) string { return "default" }), ) // 100 items per minute observable := ro.Pipe1( ro.Just("item1", "item2", "item3", "item4", "item5"), roratelimit.NewRateLimiter[string](100, time.Minute, func(item string) string { return "default" }), ) // 1000 items per hour observable := ro.Pipe1( ro.Just("item1", "item2", "item3", "item4", "item5"), roratelimit.NewRateLimiter[string](1000, time.Hour, func(item string) string { return "default" }), ) ``` -------------------------------- ### Install ICS Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/ics/README.md Installs the ICS plugin for the ro library using go get. This command fetches and installs the necessary package to use ICS file and URL reading functionalities. ```bash go get github.com/samber/ro/plugins/ics ``` -------------------------------- ### Install Zap Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/observability/zap/README.md Installs the Zap plugin for the ro observability library using go get. This command fetches and installs the necessary package to enable Zap logging within ro observables. ```bash go get github.com/samber/ro/plugins/observability/zap ``` -------------------------------- ### Install fsnotify Plugin for ro Source: https://github.com/samber/ro/blob/main/plugins/fsnotify/README.md Installs the fsnotify plugin for the ro framework using go get. This command fetches and installs the necessary package to enable file system monitoring capabilities. ```bash go get github.com/samber/ro/plugins/fsnotify ``` -------------------------------- ### Create and Subscribe to an Observable Stream in Go Source: https://github.com/samber/ro/blob/main/docs/docs/getting-started.md Demonstrates creating a simple observable stream that emits ticks at a 1-second interval, takes the first 5 ticks, transforms them into strings, and prints them to the console. It then waits for the subscription to complete. ```go package main import ( "fmt" "time" "github.com/samber/ro" ) func main() { // Create a simple stream observable := ro.Pipe2( ro.Interval(1 * time.Second), ro.Take[int64](5), ro.Map(func(x int64) string { return fmt.Sprintf("Tick: %d", x) }), ) // Subscribe and print values subscription := observable.Subscribe(ro.OnNext(func(s string) { fmt.Println(s) })) // Wait for completion subscription.Wait() } ``` -------------------------------- ### Configure Rate Limiter Stores (Go) Source: https://github.com/samber/ro/blob/main/plugins/ratelimit/ulule/README.md Illustrates how to configure different storage backends for the rate limiter. It shows examples for an in-memory store and a distributed Redis store, highlighting the necessary client setup and store instantiation. ```go // Memory store (in-process) store := memory.NewStore() // Redis store (distributed) redisClient := redis.NewClient(&redis.Options{ Addr: "localhost:6379", }) store := redis.NewStoreWithOptions(redisClient, limiter.StoreOptions{ Prefix: "rate_limiter", }) ``` -------------------------------- ### Install ICS Sub-package (Go) Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/ics.md Installs the ICS sub-package for the ro library using go get. This command fetches and installs the necessary package to enable ICS file and URL processing within your Go project. ```bash go get -u github.com/samber/ro/plugins/ics ``` -------------------------------- ### Install ro/plugins/signal Package Source: https://github.com/samber/ro/blob/main/docs/docs/plugins/signal.md This snippet shows how to install the signal sub-package of ro using go get. This is the first step to using the signal operators in your project. ```bash go get -u github.com/samber/ro/plugins/signal ``` -------------------------------- ### Install go-psi Dependency Source: https://github.com/samber/ro/blob/main/plugins/samber/psi/README.md Provides the command to fetch and install the 'samber/go-psi' library, which is a required dependency for the project. ```bash go get github.com/samber/go-psi ```