From 2af46af6f1d3009c1fdb61b1af4213f256fdc3c5 Mon Sep 17 00:00:00 2001 From: woorui Date: Mon, 25 Nov 2024 16:46:18 +0800 Subject: [PATCH 1/3] chore: remove yomo rx pkg --- .github/workflows/go.yml | 4 +- cli/init.go | 9 +- cli/serverless/golang/serverless.go | 9 - cli/serverless/golang/template.go | 10 - cli/serverless/golang/templates/init_rx.tmpl | 43 - cli/serverless/golang/templates/main_rx.tmpl | 81 -- docs/pages/docs/cli/sfn.mdx | 1 - example/6-mesh/stream-fn/app.go | 36 +- go.mod | 48 +- go.sum | 102 +-- rx/factory.go | 63 -- rx/runtime.go | 93 -- rx/stream.go | 331 ------- rx/stream_operator.go | 853 ------------------- 14 files changed, 81 insertions(+), 1602 deletions(-) delete mode 100644 cli/serverless/golang/templates/init_rx.tmpl delete mode 100644 cli/serverless/golang/templates/main_rx.tmpl delete mode 100644 rx/factory.go delete mode 100644 rx/runtime.go delete mode 100644 rx/stream.go delete mode 100644 rx/stream_operator.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5b7e51727..41b414f60 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,7 @@ jobs: run: go build $(go list ./... | grep -v /example) - name: Upload coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: - file: coverage.txt + files: coverage.txt token: ${{ secrets.CODECOV_TOKEN }} diff --git a/cli/init.go b/cli/init.go index af32b31ae..cab3dc2e8 100644 --- a/cli/init.go +++ b/cli/init.go @@ -27,10 +27,7 @@ import ( "github.com/yomorun/yomo/pkg/log" ) -var ( - name string - rx bool -) +var name string // initCmd represents the init command var initCmd = &cobra.Command{ @@ -52,9 +49,6 @@ var initCmd = &cobra.Command{ // create app.go fname := filepath.Join(name, defaultSFNSourceFile) contentTmpl := golang.InitTmpl - if rx { - contentTmpl = golang.InitRxTmpl - } if err := file.PutContents(fname, contentTmpl); err != nil { log.FailureStatusEvent(os.Stdout, "Write stream function into app.go file failure with the error: %v", err) return @@ -85,5 +79,4 @@ func init() { rootCmd.AddCommand(initCmd) initCmd.Flags().StringVarP(&name, "name", "n", "", "The name of Stream Function") - initCmd.Flags().BoolVarP(&rx, "rx", "r", false, "Use RxStream Handler") } diff --git a/cli/serverless/golang/serverless.go b/cli/serverless/golang/serverless.go index f0e833b17..5da589f26 100644 --- a/cli/serverless/golang/serverless.go +++ b/cli/serverless/golang/serverless.go @@ -57,8 +57,6 @@ func (s *GolangServerless) Init(opts *serverless.Options) error { WithInputSchema: opt.WithInputSchema, } - // determine: rx stream serverless or raw bytes serverless. - isRx := strings.Contains(string(source), "rx.Stream") isWasi := opts.WASI // main function template mainFuncTmpl := MainFuncTmpl @@ -66,13 +64,6 @@ func (s *GolangServerless) Init(opts *serverless.Options) error { if isWasi { mainFuncTmpl = WasiMainFuncTmpl } - // rx template - if isRx { - if isWasi { - return errors.New("wasi does not support rx.Stream") - } - mainFuncTmpl = MainFuncRxTmpl - } mainFunc, err := RenderTmpl(string(mainFuncTmpl), &ctx) if err != nil { return fmt.Errorf("Init: %s", err) diff --git a/cli/serverless/golang/template.go b/cli/serverless/golang/template.go index 992d284df..d1767dd0b 100644 --- a/cli/serverless/golang/template.go +++ b/cli/serverless/golang/template.go @@ -6,13 +6,6 @@ import ( "text/template" ) -// MainFuncRxTmpl the rxstream serverless of the main function template -// -//go:embed templates/main_rx.tmpl -var MainFuncRxTmpl []byte - -// MainFuncTmpl the raw bytes serverless of the main function template -// //go:embed templates/main.tmpl var MainFuncTmpl []byte @@ -22,9 +15,6 @@ var InitTmpl []byte //go:embed templates/init_test.tmpl var InitTestTmpl []byte -//go:embed templates/init_rx.tmpl -var InitRxTmpl []byte - //go:embed templates/wasi_main.tmpl var WasiMainFuncTmpl []byte diff --git a/cli/serverless/golang/templates/init_rx.tmpl b/cli/serverless/golang/templates/init_rx.tmpl deleted file mode 100644 index b8f374c80..000000000 --- a/cli/serverless/golang/templates/init_rx.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "fmt" - "time" - - "github.com/yomorun/yomo/rx" -) - -// NoiseData represents the structure of data -type NoiseData struct { - Noise float32 `json:"noise"` // Noise value - Time int64 `json:"time"` // Timestamp (ms) - From string `json:"from"` // Source IP -} - -var echo = func(_ context.Context, i interface{}) (interface{}, error) { - value := i.(*NoiseData) - value.Noise = value.Noise / 10 - rightNow := time.Now().UnixNano() / int64(time.Millisecond) - fmt.Printf("[%s] %d > value: %f ⚡️=%dms\n", value.From, value.Time, value.Noise, rightNow-value.Time) - return value.Noise, nil -} - -// Handler will handle data in Rx way -func Handler(rxstream rx.Stream) rx.Stream { - stream := rxstream. - Unmarshal(json.Unmarshal, func() interface{} { return &NoiseData{} }). - Debounce(50). - Map(echo). - StdOut(). - Marshal(json.Marshal). - PipeBackToZipper(0x34) - - return stream -} - -func DataTags() []uint32 { - return []uint32{0x33} -} - diff --git a/cli/serverless/golang/templates/main_rx.tmpl b/cli/serverless/golang/templates/main_rx.tmpl deleted file mode 100644 index 196f24bd1..000000000 --- a/cli/serverless/golang/templates/main_rx.tmpl +++ /dev/null @@ -1,81 +0,0 @@ -{{if and .WithDescription (not .WithInputSchema)}} -func InputSchema() any { - return nil -} -{{end}} - -// Serverless main function -func main() { - if err := rootCmd.Execute(); err != nil { - fmt.Println(err) - os.Exit(1) - } -} - -var ( - name string - credential string - zipper string - rootCmd = &cobra.Command{ - Short: "Start a YoMo Stream Function", - Long: "Start a YoMo Stream Function", - Run: func(cmd *cobra.Command, args []string) { - run(cmd, args) - }, - } -) - -func run(_ *cobra.Command, _ []string) { - name := viper.GetString("name") - credential := viper.GetString("credential") - addr := viper.GetString("zipper") - // create a new stream function - sfn := yomo.NewStreamFunction( - name, - addr, - yomo.WithSfnCredential(credential), - {{if .WithDescription}}yomo.WithSfnAIFunctionDefinition(Description(), InputSchema()),{{end}} - ) - {{if .WithInitFunc}} - // init - if err := sfn.Init(Init); err != nil { - log.Printf("[sfn] init error[%s], %v\n", addr, err) - os.Exit(1) - } - {{end}} - // set observe data tags - sfn.SetObserveDataTags(DataTags()...) - {{if .WithWantedTarget}} - // set wanted target - sfn.SetWantedTarget(WantedTarget()) - {{end}} - // create a Rx runtime. - rt := rx.NewRuntime(sfn) - // set handler - sfn.SetHandler(rt.RawByteHandler) - // set error handler - sfn.SetErrorHandler(func(err error) { - log.Printf("[sfn][%s] error handler: %T %v\n", addr, err, err) - }) - // connect to zipper - err := sfn.Connect() - if err != nil { - log.Printf("[sfn] connect to zipper[%s], %v\n", addr, err) - os.Exit(1) - } - defer sfn.Close() - // pipe rx stream and rx handler. - rt.Pipe(Handler) - - sfn.Wait() -} - -func init() { - rootCmd.Flags().StringVarP(&zipper, "zipper", "z", "localhost:9000", "YoMo-Zipper endpoint addr") - rootCmd.Flags().StringVarP(&name, "name", "n", "", "yomo stream function name") - rootCmd.Flags().StringVarP(&credential, "credential", "d", "", "client credential payload, eg: `token:dBbBiRE7`") - viper.SetEnvPrefix("YOMO_SFN") - viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) - viper.BindPFlags(rootCmd.Flags()) - viper.AutomaticEnv() -} diff --git a/docs/pages/docs/cli/sfn.mdx b/docs/pages/docs/cli/sfn.mdx index 5682c161d..10fdb3125 100644 --- a/docs/pages/docs/cli/sfn.mdx +++ b/docs/pages/docs/cli/sfn.mdx @@ -14,7 +14,6 @@ yomo init [flags] project-name ## Flags -- `-r` or `--rx`: Generate a StreamFunction project in Rx. - `-n` or `--name`: Set the name of the StreamFunction project. ## Example diff --git a/example/6-mesh/stream-fn/app.go b/example/6-mesh/stream-fn/app.go index ad8e67e59..5e816c953 100644 --- a/example/6-mesh/stream-fn/app.go +++ b/example/6-mesh/stream-fn/app.go @@ -10,7 +10,7 @@ import ( "time" "github.com/yomorun/yomo" - "github.com/yomorun/yomo/rx" + "github.com/yomorun/yomo/serverless" ) // NoiseDataKey represents the Tag of a Y3 encoded data packet @@ -23,27 +23,25 @@ type NoiseData struct { From string `json:"from"` } -var region = os.Getenv("REGION") - var echo = func(_ context.Context, i interface{}) (interface{}, error) { value := i.(*NoiseData) rightNow := time.Now().UnixNano() / int64(time.Millisecond) - fmt.Println(fmt.Sprintf("%s %d > value: %f ⚡️=%dms", value.From, value.Time, value.Noise, rightNow-value.Time)) + fmt.Printf("%s %d > value: %f ⚡️=%dms\n", value.From, value.Time, value.Noise, rightNow-value.Time) value.Noise = value.Noise / 10 return value, nil } -// Handler will handle data in Rx way -func Handler(rxstream rx.Stream) rx.Stream { - log.Println("Handler is running...") - stream := rxstream. - Unmarshal(json.Unmarshal, func() interface{} { return &NoiseData{} }). - Debounce(50). - Map(echo). - Marshal(json.Marshal). - PipeBackToZipper(0x14) - - return stream +func Handler(ctx serverless.Context) { + data := ctx.Data() + log.Printf("✅ [fn] receive <- %v", string(data)) + + nd := &NoiseData{} + _ = json.Unmarshal(data, nd) + + e, _ := echo(context.Background(), nd) + + r, _ := json.Marshal(e) + ctx.Write(0x14, r) } func main() { @@ -55,11 +53,8 @@ func main() { sfn.SetObserveDataTags(DataTags()...) defer sfn.Close() - // create a Rx runtime. - rt := rx.NewRuntime(sfn) - // set handler - sfn.SetHandler(rt.RawByteHandler) + sfn.SetHandler(Handler) // set error handler sfn.SetErrorHandler(func(err error) { @@ -73,9 +68,6 @@ func main() { return } - // pipe rx stream and rx handler. - rt.Pipe(Handler) - sfn.Wait() } diff --git a/go.mod b/go.mod index 4578bae1b..6a2b8cf37 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,11 @@ module github.com/yomorun/yomo go 1.21 require ( - github.com/anthropics/anthropic-sdk-go v0.1.0-alpha.1 + github.com/anthropics/anthropic-sdk-go v0.2.0-alpha.4 github.com/briandowns/spinner v1.23.0 github.com/bytecodealliance/wasmtime-go/v9 v9.0.0 github.com/caarlos0/env/v6 v6.10.1 - github.com/cenkalti/backoff/v4 v4.3.0 - github.com/fatih/color v1.17.0 + github.com/fatih/color v1.18.0 github.com/google/generative-ai-go v0.18.0 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/invopop/jsonschema v0.12.0 @@ -16,9 +15,8 @@ require ( github.com/lmittmann/tint v1.0.4 github.com/matoous/go-nanoid/v2 v2.1.0 github.com/quic-go/quic-go v0.46.0 - github.com/reactivex/rxgo/v2 v2.5.0 github.com/robfig/cron/v3 v3.0.1 - github.com/sashabaranov/go-openai v1.32.2 + github.com/sashabaranov/go-openai v1.35.6 github.com/second-state/WasmEdge-go v0.13.4 github.com/shirou/gopsutil/v3 v3.24.5 github.com/spf13/cobra v1.8.0 @@ -31,26 +29,26 @@ require ( go.opentelemetry.io/otel v1.29.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 - go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/sdk v1.29.0 go.opentelemetry.io/otel/trace v1.29.0 golang.org/x/mod v0.20.0 golang.org/x/tools v0.24.0 - google.golang.org/api v0.199.0 + google.golang.org/api v0.206.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v3 v3.0.1 ) require ( - cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go v0.116.0 // indirect cloud.google.com/go/ai v0.8.0 // indirect - cloud.google.com/go/auth v0.9.5 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/auth v0.10.2 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.5 // indirect cloud.google.com/go/compute/metadata v0.5.2 // indirect cloud.google.com/go/longrunning v0.6.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emirpasic/gods v1.12.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -63,7 +61,7 @@ require ( github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect - github.com/googleapis/gax-go/v2 v2.13.0 // indirect + github.com/googleapis/gax-go/v2 v2.14.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -83,9 +81,7 @@ require ( github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/teivah/onecontext v0.0.0-20200513185103-40f981bfd775 // indirect github.com/tidwall/gjson v1.14.4 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect @@ -103,18 +99,18 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect - golang.org/x/time v0.6.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect + golang.org/x/time v0.8.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index 34a26a07f..4dff6f477 100644 --- a/go.sum +++ b/go.sum @@ -2,14 +2,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= -cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= -cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= +cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= +cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= cloud.google.com/go/ai v0.8.0 h1:rXUEz8Wp2OlrM8r1bfmpF2+VKqc1VJpafE3HgzRnD/w= cloud.google.com/go/ai v0.8.0/go.mod h1:t3Dfk4cM61sytiggo2UyGsDVW3RF1qGZaUKDrZFyqkE= -cloud.google.com/go/auth v0.9.5 h1:4CTn43Eynw40aFVr3GpPqsQponx2jv0BQpjvajsbbzw= -cloud.google.com/go/auth v0.9.5/go.mod h1:Xo0n7n66eHyOWWCnitop6870Ilwo3PiZyodVkkH1xWM= -cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= -cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= +cloud.google.com/go/auth v0.10.2 h1:oKF7rgBfSHdp/kuhXtqU/tNDr0mZqhYbEh+6SiqzkKo= +cloud.google.com/go/auth v0.10.2/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= +cloud.google.com/go/auth/oauth2adapt v0.2.5 h1:2p29+dePqsCHPP1bqDJcKj4qxRyYCcbzKpFyKGt3MTk= +cloud.google.com/go/auth/oauth2adapt v0.2.5/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/longrunning v0.6.0 h1:mM1ZmaNsQsnb+5n1DNPeL0KwQd9jQRqSqSDEkBZr+aI= @@ -21,8 +21,8 @@ dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/anthropics/anthropic-sdk-go v0.1.0-alpha.1 h1:hkXzwiRxqpeMUTrLIplM7HMPLbo8H6RISJP8VjoMv0M= -github.com/anthropics/anthropic-sdk-go v0.1.0-alpha.1/go.mod h1:GJxtdOs9K4neo8Gg65CjJ7jNautmldGli5/OFNabOoo= +github.com/anthropics/anthropic-sdk-go v0.2.0-alpha.4 h1:TdGQS+RoR4AUO6gqUL74yK1dz/Arrt/WG+dxOj6Yo6A= +github.com/anthropics/anthropic-sdk-go v0.2.0-alpha.4/go.mod h1:GJxtdOs9K4neo8Gg65CjJ7jNautmldGli5/OFNabOoo= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -36,7 +36,6 @@ github.com/bytecodealliance/wasmtime-go/v9 v9.0.0 h1:lkyiPbbo++bSmDyJVxDQwxxaiu3 github.com/bytecodealliance/wasmtime-go/v9 v9.0.0/go.mod h1:zpOxt1j5vj44AzXZVhS4H+hr39vMk4hDlyC42kGksbU= github.com/caarlos0/env/v6 v6.10.1 h1:t1mPSxNpei6M5yAeu1qtRdPAK29Nbcf/n3G7x+b3/II= github.com/caarlos0/env/v6 v6.10.1/go.mod h1:hvp/ryKXKipEkcuYjs9mI4bBCg+UI0Yhgm5Zu0ddvwc= -github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -52,14 +51,12 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -129,8 +126,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gT github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= -github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= +github.com/googleapis/gax-go/v2 v2.14.0 h1:f+jMrjBPl+DL9nI4IQzLUxMq7XrAqFYB7hBPqMNIe8o= +github.com/googleapis/gax-go/v2 v2.14.0/go.mod h1:lhBCnjdLrWRaPvLWhmc8IS24m9mr07qSYnHncrgo+zk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= @@ -205,8 +202,6 @@ github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7q github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/quic-go/quic-go v0.46.0 h1:uuwLClEEyk1DNvchH8uCByQVjo3yKL9opKulExNDs7Y= github.com/quic-go/quic-go v0.46.0/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI= -github.com/reactivex/rxgo/v2 v2.5.0 h1:FhPgHwX9vKdNQB2gq9EPt+EKk9QrrzoeztGbEEnZam4= -github.com/reactivex/rxgo/v2 v2.5.0/go.mod h1:bs4fVZxcb5ZckLIOeIeVH942yunJLWDABWGbrHAW+qU= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -217,8 +212,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/second-state/WasmEdge-go v0.13.4 h1:NHfJC+aayUW93ydAzlcX7Jx1WDRpI24KvY5SAbeTyvY= github.com/second-state/WasmEdge-go v0.13.4/go.mod h1:HyBf9hVj1sRAjklsjc1Yvs9b5RcmthPG9z99dY78TKg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -267,11 +262,9 @@ github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -283,8 +276,6 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/teivah/onecontext v0.0.0-20200513185103-40f981bfd775 h1:BLNsFR8l/hj/oGjnJXkd4Vi3s4kQD3/3x8HSAE4bzN0= -github.com/teivah/onecontext v0.0.0-20200513185103-40f981bfd775/go.mod h1:XUZ4x3oGhWfiOnUvTslnKKs39AWUct3g3yJvXTQSJOQ= github.com/tetratelabs/wazero v1.7.2 h1:1+z5nXJNwMLPAWaTePFi49SSTL0IMx/i3Fg8Yc25GDc= github.com/tetratelabs/wazero v1.7.2/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -328,16 +319,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= @@ -348,8 +337,8 @@ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -357,8 +346,6 @@ golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -371,25 +358,23 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -404,19 +389,19 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -424,16 +409,14 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.199.0 h1:aWUXClp+VFJmqE0JPvpZOK3LDQMyFKYIow4etYd9qxs= -google.golang.org/api v0.199.0/go.mod h1:ohG4qSztDJmZdjK/Ar6MhbAmb/Rpi4JHOqagsh90K28= +google.golang.org/api v0.206.0 h1:A27GClesCSheW5P2BymVHjpEeQ2XHH8DI8Srs2HI2L8= +google.golang.org/api v0.206.0/go.mod h1:BtB8bfjTYIrai3d8UyvPmV9REGgox7coh+ZRwm0b+W8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -445,10 +428,10 @@ google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -457,8 +440,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -468,10 +451,9 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= diff --git a/rx/factory.go b/rx/factory.go deleted file mode 100644 index 24df0ff03..000000000 --- a/rx/factory.go +++ /dev/null @@ -1,63 +0,0 @@ -// Package rx provides the Rx interfaces. -package rx - -import ( - "context" - - "github.com/reactivex/rxgo/v2" -) - -// Factory creates the rx.Stream from several sources. -type Factory interface { - // FromChannel creates a new Stream from a channel. - FromChannel(ctx context.Context, channel chan interface{}) Stream - - // FromItems creates a new Stream from items. - FromItems(ctx context.Context, items []interface{}) Stream -} - -type factoryImpl struct { -} - -// NewFactory creates a new Rx factory. -func NewFactory() Factory { - return &factoryImpl{} -} - -// FromChannel creates a new Stream from a channel. -func (fac *factoryImpl) FromChannel(ctx context.Context, channel chan interface{}) Stream { - f := func(ctx context.Context, next chan rxgo.Item) { - defer close(next) - - for { - select { - case <-ctx.Done(): - return - case item, ok := <-channel: - if !ok { - return - } - - switch item := item.(type) { - default: - Of(item).SendContext(ctx, next) - case error: - rxgo.Error(item).SendContext(ctx, next) - } - } - } - } - return CreateObservable(ctx, f) -} - -// FromItems creates a new Stream from items. -func (fac *factoryImpl) FromItems(ctx context.Context, items []interface{}) Stream { - next := make(chan rxgo.Item) - go func() { - for _, item := range items { - next <- Of(item) - } - }() - - return ConvertObservable(ctx, rxgo.FromChannel(next)) -} diff --git a/rx/runtime.go b/rx/runtime.go deleted file mode 100644 index d7ce6fac5..000000000 --- a/rx/runtime.go +++ /dev/null @@ -1,93 +0,0 @@ -package rx - -import ( - "context" - - "github.com/yomorun/yomo" - "github.com/yomorun/yomo/core/frame" - "github.com/yomorun/yomo/core/ylog" - "github.com/yomorun/yomo/serverless" -) - -// Runtime is the Stream Serverless Runtime for RxStream. -type Runtime struct { - rawBytesChan chan interface{} - sfn yomo.StreamFunction - stream Stream -} - -// NewRuntime creates a new Rx Stream Serverless Runtime. -func NewRuntime(sfn yomo.StreamFunction) *Runtime { - return &Runtime{ - rawBytesChan: make(chan interface{}), - sfn: sfn, - } -} - -// RawByteHandler is the Handler for RawBytes. -func (r *Runtime) RawByteHandler(ctx serverless.Context) { - go func() { - r.rawBytesChan <- ctx.Data() - }() - - // observe the data from RxStream. - for item := range r.stream.Observe() { - if item.Error() { - ylog.Error("[Rx Handler] Handler got an error", item.E) - continue - } - - if item.V == nil { - ylog.Warn("[Rx Handler] the returned data is nil.") - continue - } - - res, ok := (item.V).(frame.DataFrame) - if !ok { - ylog.Warn("[Rx Handler] the data is not a frame.PayloadFrame, won't send it to YoMo-Zipper.") - continue - } - - ylog.Debug("[RawByteHandler] Send data to YoMo-Zipper.", "tag", res.Tag) - ctx.Write(res.Tag, res.Payload) - } -} - -// PipeHandler processes data sequentially. -func (r *Runtime) PipeHandler(in <-chan []byte, out chan<- *frame.DataFrame) { - for { - select { - case req := <-in: - r.rawBytesChan <- req - case item := <-r.stream.Observe(): - if item.Error() { - ylog.Error("[rx PipeHandler] Handler got an error", item.E) - continue - } - - if item.V == nil { - ylog.Warn("[rx PipeHandler] the returned data is nil.") - continue - } - - res, ok := (item.V).(frame.DataFrame) - if !ok { - ylog.Warn("[rx PipeHandler] the data is not a frame.DataFrame, won't send it to YoMo-Zipper.") - continue - } - - ylog.Info("[rx PipeHandler] Send data with [tag=%#x] to YoMo-Zipper.", res.Tag) - out <- &res - } - } -} - -// Pipe the RxHandler with RxStream. -func (r *Runtime) Pipe(rxHandler func(rxstream Stream) Stream) { - fac := NewFactory() - // create a RxStream from raw bytes channel. - rxstream := fac.FromChannel(context.Background(), r.rawBytesChan) - - // run RxHandler and get a new RxStream. - r.stream = rxHandler(rxstream) -} diff --git a/rx/stream.go b/rx/stream.go deleted file mode 100644 index 8f4397da4..000000000 --- a/rx/stream.go +++ /dev/null @@ -1,331 +0,0 @@ -package rx - -import ( - "context" - "time" - - "github.com/cenkalti/backoff/v4" - "github.com/reactivex/rxgo/v2" - "github.com/yomorun/yomo/core/frame" -) - -// Stream is the interface for RxStream. -type Stream interface { - rxgo.Iterable - - // PipeBackToZipper write the DataFrame with a specified DataID. - PipeBackToZipper(dataTag frame.Tag) Stream - - // RawBytes get the raw bytes in Stream which receives from YoMo-Zipper. - RawBytes() Stream - - // StdOut writes the value as standard output. - StdOut(opts ...rxgo.Option) Stream - - // AuditTime ignores values for duration milliseconds, then only emits the most recent value. - AuditTime(milliseconds uint32, opts ...rxgo.Option) Stream - - // DefaultIfEmptyWithTime emits a default value if didn't receive any values for duration milliseconds. - DefaultIfEmptyWithTime(milliseconds uint32, defaultValue interface{}, opts ...rxgo.Option) Stream - - // All determines whether all items emitted by an Observable meet some criteria - All(predicate rxgo.Predicate, opts ...rxgo.Option) Stream - - // AverageFloat32 calculates the average of numbers emitted by an Observable and emits the average float32. - AverageFloat32(opts ...rxgo.Option) Stream - - // AverageFloat64 calculates the average of numbers emitted by an Observable and emits the average float64. - AverageFloat64(opts ...rxgo.Option) Stream - - // AverageInt calculates the average of numbers emitted by an Observable and emits the average int. - AverageInt(opts ...rxgo.Option) Stream - - // AverageInt8 calculates the average of numbers emitted by an Observable and emits the average int8. - AverageInt8(opts ...rxgo.Option) Stream - - // AverageInt16 calculates the average of numbers emitted by an Observable and emits the average int16. - AverageInt16(opts ...rxgo.Option) Stream - - // AverageInt32 calculates the average of numbers emitted by an Observable and emits the average int32. - AverageInt32(opts ...rxgo.Option) Stream - - // AverageInt64 calculates the average of numbers emitted by an Observable and emits the average int64. - AverageInt64(opts ...rxgo.Option) Stream - - // BackOffRetry implements a backoff retry if a source Observable sends an error, resubscribe to it in the hopes that it will complete without error. - // Cannot be run in parallel. - BackOffRetry(backOffCfg backoff.BackOff, opts ...rxgo.Option) Stream - - // BufferWithCount returns an Observable that emits buffers of items it collects - // from the source Observable. - // The resulting Observable emits buffers every skip items, each containing a slice of count items. - // When the source Observable completes or encounters an error, - // the resulting Observable emits the current buffer and propagates - // the notification from the source Observable. - BufferWithCount(count int, opts ...rxgo.Option) Stream - - // BufferWithTime returns an Observable that emits buffers of items it collects from the source - // Observable. The resulting Observable starts a new buffer periodically, as determined by the - // timeshift argument. It emits each buffer after a fixed timespan, specified by the timespan argument. - // When the source Observable completes or encounters an error, the resulting Observable emits - // the current buffer and propagates the notification from the source Observable. - BufferWithTime(milliseconds uint32, opts ...rxgo.Option) Stream - - // BufferWithTimeOrCount returns an Observable that emits buffers of items it collects from the source - // Observable either from a given count or at a given time interval. - BufferWithTimeOrCount(milliseconds uint32, count int, opts ...rxgo.Option) Stream - - // Connect instructs a connectable Observable to begin emitting items to its subscribers. - Connect(ctx context.Context) (context.Context, rxgo.Disposable) - - // Contains determines whether an Observable emits a particular item or not. - Contains(equal rxgo.Predicate, opts ...rxgo.Option) Stream - - // Count counts the number of items emitted by the source Observable and emit only this value. - Count(opts ...rxgo.Option) Stream - - // Debounce only emits an item from an Observable if a particular timespan has passed without it emitting another item. - Debounce(milliseconds uint32, opts ...rxgo.Option) Stream - - // DefaultIfEmpty returns an Observable that emits the items emitted by the source - // Observable or a specified default item if the source Observable is empty. - DefaultIfEmpty(defaultValue interface{}, opts ...rxgo.Option) Stream - - // Distinct suppresses duplicate items in the original Observable and returns - // a new Observable. - Distinct(apply rxgo.Func, opts ...rxgo.Option) Stream - - // DistinctUntilChanged suppresses consecutive duplicate items in the original Observable. - // Cannot be run in parallel. - DistinctUntilChanged(apply rxgo.Func, opts ...rxgo.Option) Stream - - // DoOnCompleted registers a callback action that will be called once the Observable terminates. - DoOnCompleted(completedFunc rxgo.CompletedFunc, opts ...rxgo.Option) rxgo.Disposed - - // DoOnError registers a callback action that will be called if the Observable terminates abnormally. - DoOnError(errFunc rxgo.ErrFunc, opts ...rxgo.Option) rxgo.Disposed - - // DoOnNext registers a callback action that will be called on each item emitted by the Observable. - DoOnNext(nextFunc rxgo.NextFunc, opts ...rxgo.Option) rxgo.Disposed - - // ElementAt emits only item n emitted by an Observable. - // Cannot be run in parallel. - ElementAt(index uint, opts ...rxgo.Option) Stream - - // Error returns the eventual Observable error. - // This method is blocking. - Error(opts ...rxgo.Option) error - - // Errors returns an eventual list of Observable errors. - // This method is blocking - Errors(opts ...rxgo.Option) []error - - // Filter emits only those items from an Observable that pass a predicate test. - Filter(apply rxgo.Predicate, opts ...rxgo.Option) Stream - - // Find emits the first item passing a predicate then complete. - Find(find rxgo.Predicate, opts ...rxgo.Option) Stream - - // First returns new Observable which emit only first item. - // Cannot be run in parallel. - First(opts ...rxgo.Option) Stream - - // FirstOrDefault returns new Observable which emit only first item. - // If the observable fails to emit any items, it emits a default value. - // Cannot be run in parallel. - FirstOrDefault(defaultValue interface{}, opts ...rxgo.Option) Stream - - // FlatMap transforms the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable. - FlatMap(apply rxgo.ItemToObservable, opts ...rxgo.Option) Stream - - // ForEach subscribes to the Observable and receives notifications for each element. - ForEach(nextFunc rxgo.NextFunc, errFunc rxgo.ErrFunc, completedFunc rxgo.CompletedFunc, opts ...rxgo.Option) rxgo.Disposed - - // GroupBy divides an Observable into a set of Observables that each emit a different group of items from the original Observable, organized by key. - GroupBy(length int, distribution func(rxgo.Item) int, opts ...rxgo.Option) Stream - - // GroupByDynamic divides an Observable into a dynamic set of Observables that each emit GroupedObservable from the original Observable, organized by key. - GroupByDynamic(distribution func(rxgo.Item) string, opts ...rxgo.Option) Stream - - // IgnoreElements ignores all items emitted by the source ObservableSource except for the errors. - // Cannot be run in parallel. - IgnoreElements(opts ...rxgo.Option) Stream - - // Join combines items emitted by two Observables whenever an item from one Observable is emitted during - // a time window defined according to an item emitted by the other Observable. - // The time is extracted using a timeExtractor function. - Join(joiner rxgo.Func2, right rxgo.Observable, timeExtractor func(interface{}) time.Time, windowInMS uint32, opts ...rxgo.Option) Stream - - // Last returns a new Observable which emit only last item. - // Cannot be run in parallel. - Last(opts ...rxgo.Option) Stream - - // LastOrDefault returns a new Observable which emit only last item. - // If the observable fails to emit any items, it emits a default value. - // Cannot be run in parallel. - LastOrDefault(defaultValue interface{}, opts ...rxgo.Option) Stream - - // Map transforms the items emitted by an Observable by applying a function to each item. - Map(apply rxgo.Func, opts ...rxgo.Option) Stream - - // Marshal transforms the items emitted by an Observable by applying a marshalling to each item. - Marshal(marshaller Marshaller, opts ...rxgo.Option) Stream - - // Max determines and emits the maximum-valued item emitted by an Observable according to a comparator. - Max(comparator rxgo.Comparator, opts ...rxgo.Option) Stream - - // Min determines and emits the minimum-valued item emitted by an Observable according to a comparator. - Min(comparator rxgo.Comparator, opts ...rxgo.Option) Stream - - // OnErrorResumeNext instructs an Observable to pass control to another Observable rather than invoking - // onError if it encounters an error. - OnErrorResumeNext(resumeSequence rxgo.ErrorToObservable, opts ...rxgo.Option) Stream - - // OnErrorReturn instructs an Observable to emit an item (returned by a specified function) - // rather than invoking onError if it encounters an error. - OnErrorReturn(resumeFunc rxgo.ErrorFunc, opts ...rxgo.Option) Stream - - // OnErrorReturnItem instructs on Observable to emit an item if it encounters an error. - OnErrorReturnItem(resume interface{}, opts ...rxgo.Option) Stream - - // Reduce applies a function to each item emitted by an Observable, sequentially, and emit the final value. - Reduce(apply rxgo.Func2, opts ...rxgo.Option) Stream - - // Repeat returns an Observable that repeats the sequence of items emitted by the source Observable - // at most count times, at a particular frequency. - // Cannot run in parallel. - Repeat(count int64, milliseconds uint32, opts ...rxgo.Option) Stream - - // Retry retries if a source Observable sends an error, resubscribe to it in the hopes that it will complete without error. - // Cannot be run in parallel. - Retry(count int, shouldRetry func(error) bool, opts ...rxgo.Option) Stream - - // Run creates an Observer without consuming the emitted items. - Run(opts ...rxgo.Option) rxgo.Disposed - - // Sample returns an Observable that emits the most recent items emitted by the source - // Iterable whenever the input Iterable emits an item. - Sample(iterable rxgo.Iterable, opts ...rxgo.Option) Stream - - // Scan apply a Func2 to each item emitted by an Observable, sequentially, and emit each successive value. - // Cannot be run in parallel. - Scan(apply rxgo.Func2, opts ...rxgo.Option) Stream - - // SequenceEqual emits true if an Observable and the input Observable emit the same items, - // in the same order, with the same termination state. Otherwise, it emits false. - SequenceEqual(iterable rxgo.Iterable, opts ...rxgo.Option) Stream - - // Send sends the items to a given channel. - Send(output chan<- rxgo.Item, opts ...rxgo.Option) - - // Serialize forces an Observable to make serialized calls and to be well-behaved. - Serialize(from int, identifier func(interface{}) int, opts ...rxgo.Option) Stream - - // Skip suppresses the first n items in the original Observable and - // returns a new Observable with the rest items. - // Cannot be run in parallel. - Skip(nth uint, opts ...rxgo.Option) Stream - - // SkipLast suppresses the last n items in the original Observable and - // returns a new Observable with the rest items. - // Cannot be run in parallel. - SkipLast(nth uint, opts ...rxgo.Option) Stream - - // SkipWhile discard items emitted by an Observable until a specified condition becomes false. - // Cannot be run in parallel. - SkipWhile(apply rxgo.Predicate, opts ...rxgo.Option) Stream - - // StartWith emits a specified Iterable before beginning to emit the items from the source Observable. - StartWith(iterable rxgo.Iterable, opts ...rxgo.Option) Stream - - // SumFloat32 calculates the average of float32 emitted by an Observable and emits a float32. - SumFloat32(opts ...rxgo.Option) Stream - - // SumFloat64 calculates the average of float64 emitted by an Observable and emits a float64. - SumFloat64(opts ...rxgo.Option) Stream - - // SumInt64 calculates the average of integers emitted by an Observable and emits an int64. - SumInt64(opts ...rxgo.Option) Stream - - // Take emits only the first n items emitted by an Observable. - // Cannot be run in parallel. - Take(nth uint, opts ...rxgo.Option) Stream - - // TakeLast emits only the last n items emitted by an Observable. - // Cannot be run in parallel. - TakeLast(nth uint, opts ...rxgo.Option) Stream - - // TakeUntil returns an Observable that emits items emitted by the source Observable, - // checks the specified predicate for each item, and then completes when the condition is satisfied. - // Cannot be run in parallel. - TakeUntil(apply rxgo.Predicate, opts ...rxgo.Option) Stream - - // TakeWhile returns an Observable that emits items emitted by the source ObservableSource so long as each - // item satisfied a specified condition, and then completes as soon as this condition is not satisfied. - // Cannot be run in parallel. - TakeWhile(apply rxgo.Predicate, opts ...rxgo.Option) Stream - - // TimeInterval converts an Observable that emits items into one that emits indications of the amount of time elapsed between those emissions. - TimeInterval(opts ...rxgo.Option) Stream - - // Timestamp attaches a timestamp to each item emitted by an Observable indicating when it was emitted. - Timestamp(opts ...rxgo.Option) Stream - - // ToMap convert the sequence of items emitted by an Observable - // into a map keyed by a specified key function. - // Cannot be run in parallel. - ToMap(keySelector rxgo.Func, opts ...rxgo.Option) Stream - - // ToMapWithValueSelector convert the sequence of items emitted by an Observable - // into a map keyed by a specified key function and valued by another - // value function. - // Cannot be run in parallel. - ToMapWithValueSelector(keySelector, valueSelector rxgo.Func, opts ...rxgo.Option) Stream - - // ToSlice collects all items from an Observable and emit them in a slice and an optional error. - // Cannot be run in parallel. - ToSlice(initialCapacity int, opts ...rxgo.Option) ([]interface{}, error) - - // Unmarshal transforms the items emitted by an Observable by applying an unmarshalling to each item. - Unmarshal(unmarshaller Unmarshaller, factory func() interface{}, opts ...rxgo.Option) Stream - - // WindowWithCount periodically subdivides items from an Observable into Observable windows of a given size and emit these windows - // rather than emitting the items one at a time. - WindowWithCount(count int, opts ...rxgo.Option) Stream - - // WindowWithTime periodically subdivides items from an Observable into Observables based on timed windows - // and emit them rather than emitting the items one at a time. - WindowWithTime(milliseconds uint32, opts ...rxgo.Option) Stream - - // WindowWithTimeOrCount periodically subdivides items from an Observable into Observables based on timed windows or a specific size - // and emit them rather than emitting the items one at a time. - WindowWithTimeOrCount(milliseconds uint32, count int, opts ...rxgo.Option) Stream - - // ZipFromIterable merges the emissions of an Iterable via a specified function - // and emit single items for each combination based on the results of this function. - ZipFromIterable(iterable rxgo.Iterable, zipper rxgo.Func2, opts ...rxgo.Option) Stream - - // SlidingWindowWithCount buffers the data in the specified sliding window size, the buffered data can be processed in the handler func. - // It returns the orginal data to Stream, not the buffered slice. - SlidingWindowWithCount(windowSize int, slideSize int, handler Handler, opts ...rxgo.Option) Stream - - // SlidingWindowWithTime buffers the data in the specified sliding window time in milliseconds, the buffered data can be processed in the handler func. - // It returns the orginal data to Stream, not the buffered slice. - SlidingWindowWithTime(windowTimeInMS uint32, slideTimeInMS uint32, handler Handler, opts ...rxgo.Option) Stream - - // // ZipMultiObservers subscribes multi Y3 observers, zips the values into a slice and calls the zipper callback when all keys are observed. - // ZipMultiObservers(observers []KeyObserveFunc, zipper func(items []interface{}) (interface{}, error)) Stream -} - -// // KeyObserveFunc is a pair of subscribed key and onObserve callback. -// type KeyObserveFunc struct { -// Key byte -// OnObserve decoder.OnObserveFunc -// } - -type ( - // Marshaller defines a marshaller type (interface{} to []byte). - Marshaller func(interface{}) ([]byte, error) - // Unmarshaller defines an unmarshaller type ([]byte to interface). - Unmarshaller func([]byte, interface{}) error -) diff --git a/rx/stream_operator.go b/rx/stream_operator.go deleted file mode 100644 index 10c0e06ab..000000000 --- a/rx/stream_operator.go +++ /dev/null @@ -1,853 +0,0 @@ -package rx - -import ( - "context" - "errors" - "fmt" - "sync" - "time" - - "github.com/cenkalti/backoff/v4" - "github.com/reactivex/rxgo/v2" - "github.com/yomorun/yomo/core/frame" - "github.com/yomorun/yomo/core/ylog" -) - -// Of creates an item from a value. -func Of(i interface{}) rxgo.Item { - return rxgo.Item{V: i} -} - -// StreamImpl is the implementation of Stream interface. -type StreamImpl struct { - ctx context.Context - observable rxgo.Observable -} - -// appendContinueOnError appends the "ContinueOnError" to options -func appendContinueOnError(ctx context.Context, opts ...rxgo.Option) []rxgo.Option { - options := append(opts, rxgo.WithErrorStrategy(rxgo.ContinueOnError)) - return append(options, rxgo.WithContext(ctx)) -} - -// All determines whether all items emitted by an Observable meet some criteria -func (s *StreamImpl) All(predicate rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.All(predicate, opts...).Observe(), opts...)} -} - -// AverageFloat32 calculates the average of numbers emitted by an Observable and emits the average float32. -func (s *StreamImpl) AverageFloat32(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageFloat32(opts...).Observe(), opts...)} -} - -// AverageFloat64 calculates the average of numbers emitted by an Observable and emits the average float64. -func (s *StreamImpl) AverageFloat64(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageFloat64(opts...).Observe(), opts...)} -} - -// AverageInt calculates the average of numbers emitted by an Observable and emits the average int. -func (s *StreamImpl) AverageInt(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageInt(opts...).Observe(), opts...)} -} - -// AverageInt8 calculates the average of numbers emitted by an Observable and emits the≤ average int8. -func (s *StreamImpl) AverageInt8(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageInt8(opts...).Observe(), opts...)} -} - -// AverageInt16 calculates the average of numbers emitted by an Observable and emits the average int16. -func (s *StreamImpl) AverageInt16(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageInt16(opts...).Observe(), opts...)} -} - -// AverageInt32 calculates the average of numbers emitted by an Observable and emits the average int32. -func (s *StreamImpl) AverageInt32(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageInt32(opts...).Observe(), opts...)} -} - -// AverageInt64 calculates the average of numbers emitted by an Observable and emits the average int64. -func (s *StreamImpl) AverageInt64(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.AverageInt64(opts...).Observe(), opts...)} -} - -// BackOffRetry implements a backoff retry if a source Observable sends an error, resubscribe to it in the hopes that it will complete without error. -// Cannot be run in parallel. -func (s *StreamImpl) BackOffRetry(backOffCfg backoff.BackOff, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.BackOffRetry(backOffCfg, opts...).Observe(), opts...)} -} - -// BufferWithCount returns an Observable that emits buffers of items it collects -// from the source Observable. -// The resulting Observable emits buffers every skip items, each containing a slice of count items. -// When the source Observable completes or encounters an error, -// the resulting Observable emits the current buffer and propagates -// the notification from the source Observable. -func (s *StreamImpl) BufferWithCount(count int, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.BufferWithCount(count, opts...).Observe(), opts...)} -} - -func getRxDuration(milliseconds uint32) rxgo.Duration { - return rxgo.WithDuration(time.Duration(milliseconds) * time.Millisecond) -} - -// BufferWithTime returns an Observable that emits buffers of items it collects from the source -// Observable. The resulting Observable starts a new buffer periodically, as determined by the -// timeshift argument. It emits each buffer after a fixed timespan, specified by the timespan argument. -// When the source Observable completes or encounters an error, the resulting Observable emits -// the current buffer and propagates the notification from the source Observable. -func (s *StreamImpl) BufferWithTime(milliseconds uint32, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.BufferWithTime(getRxDuration(milliseconds), opts...).Observe(), opts...)} -} - -// BufferWithTimeOrCount returns an Observable that emits buffers of items it collects from the source -// Observable either from a given count or at a given time interval. -func (s *StreamImpl) BufferWithTimeOrCount(milliseconds uint32, count int, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.BufferWithTimeOrCount(getRxDuration(milliseconds), count, opts...).Observe(), opts...)} -} - -// Connect instructs a connectable Observable to begin emitting items to its subscribers. -func (s *StreamImpl) Connect(ctx context.Context) (context.Context, rxgo.Disposable) { - return s.observable.Connect(ctx) -} - -// Contains determines whether an Observable emits a particular item or not. -func (s *StreamImpl) Contains(equal rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Contains(equal, opts...).Observe(), opts...)} -} - -// Count counts the number of items emitted by the source Observable and emit only this value. -func (s *StreamImpl) Count(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Count(opts...).Observe(), opts...)} -} - -// Debounce only emits an item from an Observable if a particular timespan has passed without it emitting another item. -func (s *StreamImpl) Debounce(milliseconds uint32, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Debounce(getRxDuration(milliseconds), opts...).Observe(), opts...)} -} - -// DefaultIfEmpty returns an Observable that emits the items emitted by the source -// Observable or a specified default item if the source Observable is empty. -func (s *StreamImpl) DefaultIfEmpty(defaultValue interface{}, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.DefaultIfEmpty(defaultValue, opts...).Observe(), opts...)} -} - -// Distinct suppresses duplicate items in the original Observable and returns -// a new Observable. -func (s *StreamImpl) Distinct(apply rxgo.Func, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Distinct(apply, opts...).Observe(), opts...)} -} - -// DistinctUntilChanged suppresses consecutive duplicate items in the original Observable. -// Cannot be run in parallel. -func (s *StreamImpl) DistinctUntilChanged(apply rxgo.Func, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.DistinctUntilChanged(apply, opts...).Observe(), opts...)} -} - -// DoOnCompleted registers a callback action that will be called once the Observable terminates. -func (s *StreamImpl) DoOnCompleted(completedFunc rxgo.CompletedFunc, opts ...rxgo.Option) rxgo.Disposed { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.DoOnCompleted(completedFunc, opts...) -} - -// DoOnError registers a callback action that will be called if the Observable terminates abnormally. -func (s *StreamImpl) DoOnError(errFunc rxgo.ErrFunc, opts ...rxgo.Option) rxgo.Disposed { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.DoOnError(errFunc, opts...) -} - -// DoOnNext registers a callback action that will be called on each item emitted by the Observable. -func (s *StreamImpl) DoOnNext(nextFunc rxgo.NextFunc, opts ...rxgo.Option) rxgo.Disposed { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.DoOnNext(nextFunc, opts...) -} - -// Error returns the eventual Observable error. -// This method is blocking. -func (s *StreamImpl) Error(opts ...rxgo.Option) error { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.Error(opts...) -} - -// Errors returns an eventual list of Observable errors. -// This method is blocking -func (s *StreamImpl) Errors(opts ...rxgo.Option) []error { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.Errors(opts...) -} - -// Filter emits only those items from an Observable that pass a predicate test. -func (s *StreamImpl) Filter(apply rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Filter(apply, opts...).Observe(), opts...)} -} - -// ElementAt emits only item n emitted by an Observable. -// Cannot be run in parallel. -func (s *StreamImpl) ElementAt(index uint, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.ElementAt(index, opts...).Observe(), opts...)} -} - -// Find emits the first item passing a predicate then complete. -func (s *StreamImpl) Find(find rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Find(find, opts...).Observe(), opts...)} -} - -// First returns new Observable which emit only first item. -// Cannot be run in parallel. -func (s *StreamImpl) First(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.First(opts...).Observe(), opts...)} -} - -// FirstOrDefault returns new Observable which emit only first item. -// If the observable fails to emit any items, it emits a default value. -// Cannot be run in parallel. -func (s *StreamImpl) FirstOrDefault(defaultValue interface{}, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.FirstOrDefault(defaultValue, opts...).Observe(), opts...)} -} - -// FlatMap transforms the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable. -func (s *StreamImpl) FlatMap(apply rxgo.ItemToObservable, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.FlatMap(apply, opts...).Observe(), opts...)} -} - -// ForEach subscribes to the Observable and receives notifications for each element. -func (s *StreamImpl) ForEach(nextFunc rxgo.NextFunc, errFunc rxgo.ErrFunc, completedFunc rxgo.CompletedFunc, opts ...rxgo.Option) rxgo.Disposed { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.ForEach(nextFunc, errFunc, completedFunc, opts...) -} - -// IgnoreElements ignores all items emitted by the source ObservableSource except for the errors. -// Cannot be run in parallel. -func (s *StreamImpl) IgnoreElements(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.IgnoreElements(opts...).Observe(), opts...)} -} - -// Join combines items emitted by two Observables whenever an item from one Observable is emitted during -// a time window defined according to an item emitted by the other Observable. -// The time is extracted using a timeExtractor function. -func (s *StreamImpl) Join(joiner rxgo.Func2, right rxgo.Observable, timeExtractor func(interface{}) time.Time, windowInMS uint32, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Join(joiner, right, timeExtractor, getRxDuration(windowInMS), opts...).Observe(), opts...)} -} - -// GroupBy divides an Observable into a set of Observables that each emit a different group of items from the original Observable, organized by key. -func (s *StreamImpl) GroupBy(length int, distribution func(rxgo.Item) int, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.GroupBy(length, distribution, opts...).Observe(), opts...)} -} - -// GroupByDynamic divides an Observable into a dynamic set of Observables that each emit GroupedObservable from the original Observable, organized by key. -func (s *StreamImpl) GroupByDynamic(distribution func(rxgo.Item) string, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.GroupByDynamic(distribution, opts...).Observe(), opts...)} -} - -// Last returns a new Observable which emit only last item. -// Cannot be run in parallel. -func (s *StreamImpl) Last(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Last(opts...).Observe(), opts...)} -} - -// LastOrDefault returns a new Observable which emit only last item. -// If the observable fails to emit any items, it emits a default value. -// Cannot be run in parallel. -func (s *StreamImpl) LastOrDefault(defaultValue interface{}, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.LastOrDefault(defaultValue, opts...).Observe(), opts...)} -} - -// Map transforms the items emitted by an Observable by applying a function to each item. -func (s *StreamImpl) Map(apply rxgo.Func, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Map(apply, opts...).Observe(), opts...)} -} - -// Marshal transforms the items emitted by an Observable by applying a marshalling to each item. -func (s *StreamImpl) Marshal(marshaller Marshaller, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - - return s.Map(func(_ context.Context, i interface{}) (interface{}, error) { - return marshaller(i) - }, opts...) -} - -// Unmarshal transforms the items emitted by an Observable by applying an unmarshalling to each item. -func (s *StreamImpl) Unmarshal(unmarshaller Unmarshaller, factory func() interface{}, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - - return s.Map(func(_ context.Context, i interface{}) (interface{}, error) { - v := factory() - err := unmarshaller(i.([]byte), v) - if err != nil { - return nil, err - } - return v, nil - }, opts...) -} - -// Max determines and emits the maximum-valued item emitted by an Observable according to a comparator. -func (s *StreamImpl) Max(comparator rxgo.Comparator, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Max(comparator, opts...).Observe(), opts...)} -} - -// Min determines and emits the minimum-valued item emitted by an Observable according to a comparator. -func (s *StreamImpl) Min(comparator rxgo.Comparator, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Min(comparator, opts...).Observe(), opts...)} -} - -// OnErrorResumeNext instructs an Observable to pass control to another Observable rather than invoking -// onError if it encounters an error. -func (s *StreamImpl) OnErrorResumeNext(resumeSequence rxgo.ErrorToObservable, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.OnErrorResumeNext(resumeSequence, opts...).Observe(), opts...)} -} - -// OnErrorReturn instructs an Observable to emit an item (returned by a specified function) -// rather than invoking onError if it encounters an error. -func (s *StreamImpl) OnErrorReturn(resumeFunc rxgo.ErrorFunc, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.OnErrorReturn(resumeFunc, opts...).Observe(), opts...)} -} - -// OnErrorReturnItem instructs on Observable to emit an item if it encounters an error. -func (s *StreamImpl) OnErrorReturnItem(resume interface{}, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.OnErrorReturnItem(resume, opts...).Observe(), opts...)} -} - -// Reduce applies a function to each item emitted by an Observable, sequentially, and emit the final value. -func (s *StreamImpl) Reduce(apply rxgo.Func2, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Reduce(apply, opts...).Observe(), opts...)} -} - -// Repeat returns an Observable that repeats the sequence of items emitted by the source Observable -// at most count times, at a particular frequency. -// Cannot run in parallel. -func (s *StreamImpl) Repeat(count int64, milliseconds uint32, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Repeat(count, getRxDuration(milliseconds), opts...).Observe(), opts...)} -} - -// Retry retries if a source Observable sends an error, resubscribe to it in the hopes that it will complete without error. -// Cannot be run in parallel. -func (s *StreamImpl) Retry(count int, shouldRetry func(error) bool, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Retry(count, shouldRetry, opts...).Observe(), opts...)} -} - -// Run creates an Observer without consuming the emitted items. -func (s *StreamImpl) Run(opts ...rxgo.Option) rxgo.Disposed { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.Run(opts...) -} - -// Sample returns an Observable that emits the most recent items emitted by the source -// Iterable whenever the input Iterable emits an item. -func (s *StreamImpl) Sample(iterable rxgo.Iterable, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Sample(iterable, opts...).Observe(), opts...)} -} - -// Scan apply a Func2 to each item emitted by an Observable, sequentially, and emit each successive value. -// Cannot be run in parallel. -func (s *StreamImpl) Scan(apply rxgo.Func2, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Scan(apply, opts...).Observe(), opts...)} -} - -// Send sends the items to a given channel. -func (s *StreamImpl) Send(output chan<- rxgo.Item, opts ...rxgo.Option) { - opts = appendContinueOnError(s.ctx, opts...) - s.observable.Send(output, opts...) -} - -// SequenceEqual emits true if an Observable and the input Observable emit the same items, -// in the same order, with the same termination state. Otherwise, it emits false. -func (s *StreamImpl) SequenceEqual(iterable rxgo.Iterable, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.SequenceEqual(iterable, opts...).Observe(), opts...)} -} - -// Serialize forces an Observable to make serialized calls and to be well-behaved. -func (s *StreamImpl) Serialize(from int, identifier func(interface{}) int, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Serialize(from, identifier, opts...).Observe(), opts...)} -} - -// Skip suppresses the first n items in the original Observable and -// returns a new Observable with the rest items. -// Cannot be run in parallel. -func (s *StreamImpl) Skip(nth uint, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Skip(nth, opts...).Observe(), opts...)} -} - -// SkipLast suppresses the last n items in the original Observable and -// returns a new Observable with the rest items. -// Cannot be run in parallel. -func (s *StreamImpl) SkipLast(nth uint, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.SkipLast(nth, opts...).Observe(), opts...)} -} - -// SkipWhile discard items emitted by an Observable until a specified condition becomes false. -// Cannot be run in parallel. -func (s *StreamImpl) SkipWhile(apply rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.SkipWhile(apply, opts...).Observe(), opts...)} -} - -// StartWith emits a specified Iterable before beginning to emit the items from the source Observable. -func (s *StreamImpl) StartWith(iterable rxgo.Iterable, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.StartWith(iterable, opts...).Observe(), opts...)} -} - -// SumFloat32 calculates the average of float32 emitted by an Observable and emits a float32. -func (s *StreamImpl) SumFloat32(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.SumFloat32(opts...).Observe(), opts...)} -} - -// SumFloat64 calculates the average of float64 emitted by an Observable and emits a float64. -func (s *StreamImpl) SumFloat64(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.SumFloat64(opts...).Observe(), opts...)} -} - -// SumInt64 calculates the average of integers emitted by an Observable and emits an int64. -func (s *StreamImpl) SumInt64(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.SumInt64(opts...).Observe(), opts...)} -} - -// Take emits only the first n items emitted by an Observable. -// Cannot be run in parallel. -func (s *StreamImpl) Take(nth uint, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Take(nth, opts...).Observe(), opts...)} -} - -// TakeLast emits only the last n items emitted by an Observable. -// Cannot be run in parallel. -func (s *StreamImpl) TakeLast(nth uint, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.TakeLast(nth, opts...).Observe(), opts...)} -} - -// TakeUntil returns an Observable that emits items emitted by the source Observable, -// checks the specified predicate for each item, and then completes when the condition is satisfied. -// Cannot be run in parallel. -func (s *StreamImpl) TakeUntil(apply rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.TakeUntil(apply, opts...).Observe(), opts...)} -} - -// TakeWhile returns an Observable that emits items emitted by the source ObservableSource so long as each -// item satisfied a specified condition, and then completes as soon as this condition is not satisfied. -// Cannot be run in parallel. -func (s *StreamImpl) TakeWhile(apply rxgo.Predicate, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.TakeWhile(apply, opts...).Observe(), opts...)} -} - -// TimeInterval converts an Observable that emits items into one that emits indications of the amount of time elapsed between those emissions. -func (s *StreamImpl) TimeInterval(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.TimeInterval(opts...).Observe(), opts...)} -} - -// Timestamp attaches a timestamp to each item emitted by an Observable indicating when it was emitted. -func (s *StreamImpl) Timestamp(opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.Timestamp(opts...).Observe(), opts...)} -} - -// ToMap convert the sequence of items emitted by an Observable -// into a map keyed by a specified key function. -// Cannot be run in parallel. -func (s *StreamImpl) ToMap(keySelector rxgo.Func, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.ToMap(keySelector, opts...).Observe(), opts...)} -} - -// ToMapWithValueSelector convert the sequence of items emitted by an Observable -// into a map keyed by a specified key function and valued by another -// value function. -// Cannot be run in parallel. -func (s *StreamImpl) ToMapWithValueSelector(keySelector, valueSelector rxgo.Func, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.ToMapWithValueSelector(keySelector, valueSelector, opts...).Observe(), opts...)} -} - -// ToSlice collects all items from an Observable and emit them in a slice and an optional error. -// Cannot be run in parallel. -func (s *StreamImpl) ToSlice(initialCapacity int, opts ...rxgo.Option) ([]interface{}, error) { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.ToSlice(initialCapacity, opts...) -} - -// WindowWithCount periodically subdivides items from an Observable into Observable windows of a given size and emit these windows -// rather than emitting the items one at a time. -func (s *StreamImpl) WindowWithCount(count int, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.WindowWithCount(count, opts...).Observe(), opts...)} -} - -// WindowWithTime periodically subdivides items from an Observable into Observables based on timed windows -// and emit them rather than emitting the items one at a time. -func (s *StreamImpl) WindowWithTime(milliseconds uint32, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.WindowWithTime(getRxDuration(milliseconds), opts...).Observe(), opts...)} -} - -// WindowWithTimeOrCount periodically subdivides items from an Observable into Observables based on timed windows or a specific size -// and emit them rather than emitting the items one at a time. -func (s *StreamImpl) WindowWithTimeOrCount(milliseconds uint32, count int, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.WindowWithTimeOrCount(getRxDuration(milliseconds), count, opts...).Observe(), opts...)} -} - -// ZipFromIterable merges the emissions of an Iterable via a specified function -// and emit single items for each combination based on the results of this function. -func (s *StreamImpl) ZipFromIterable(iterable rxgo.Iterable, zipper rxgo.Func2, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - return &StreamImpl{ctx: s.ctx, observable: rxgo.FromChannel(s.observable.ZipFromIterable(iterable, zipper, opts...).Observe(), opts...)} -} - -// Observe the items in RxStream. -func (s *StreamImpl) Observe(opts ...rxgo.Option) <-chan rxgo.Item { - opts = appendContinueOnError(s.ctx, opts...) - return s.observable.Observe(opts...) -} - -// DefaultIfEmptyWithTime emits a default value if didn't receive any values for duration milliseconds. -func (s *StreamImpl) DefaultIfEmptyWithTime(milliseconds uint32, defaultValue interface{}, opts ...rxgo.Option) Stream { - f := func(ctx context.Context, next chan rxgo.Item) { - defer close(next) - observe := s.Observe(opts...) - - for { - select { - case <-ctx.Done(): - return - case item, ok := <-observe: - if !ok { - return - } - - if !item.SendContext(ctx, next) { - return - } - case <-time.After(time.Duration(milliseconds) * time.Millisecond): - if !rxgo.Of(defaultValue).SendContext(ctx, next) { - return - } - } - } - } - return CreateObservable(s.ctx, f, opts...) -} - -// StdOut writes the item as standard output. -func (s *StreamImpl) StdOut(opts ...rxgo.Option) Stream { - f := func(ctx context.Context, next chan rxgo.Item) { - defer close(next) - observe := s.Observe(opts...) - - for { - select { - case <-ctx.Done(): - return - case item, ok := <-observe: - if !ok { - return - } - - if !item.Error() { - fmt.Println("[StdOut]: ", item.V) - } - - if !item.SendContext(ctx, next) { - return - } - } - } - } - return CreateObservable(s.ctx, f, opts...) -} - -// AuditTime ignores values for duration milliseconds, then only emits the most recent value. -func (s *StreamImpl) AuditTime(milliseconds uint32, opts ...rxgo.Option) Stream { - opts = appendContinueOnError(s.ctx, opts...) - o := s.observable.BufferWithTime(getRxDuration(milliseconds), opts...).Map(func(_ context.Context, i interface{}) (interface{}, error) { - return i.([]interface{})[len(i.([]interface{}))-1], nil - }, opts...) - return ConvertObservable(s.ctx, o) -} - -// RawBytes get the raw bytes in Stream which receives from YoMo-Zipper. -func (s *StreamImpl) RawBytes() Stream { - panic("RawBytes()") -} - -// PipeBackToZipper sets a specified DataTag to bytes and will pipe it back to zipper. -func (s *StreamImpl) PipeBackToZipper(dataTag frame.Tag) Stream { - f := func(ctx context.Context, next chan rxgo.Item) { - defer close(next) - observe := s.Observe() - - for { - select { - case <-ctx.Done(): - return - case item, ok := <-observe: - if !ok { - return - } - - if item.Error() { - continue - } - - buf, ok := (item.V).([]byte) - if !ok { - ylog.Warn("[PipeBackToZipper] the data is not a []byte, won't send pass it to next.") - continue - } - - data := frame.DataFrame{ - Tag: dataTag, - Payload: buf, - } - - if !Of(data).SendContext(ctx, next) { - return - } - } - } - } - return CreateObservable(s.ctx, f) -} - -// SlidingWindowWithCount buffers the data in the specified sliding window size, the buffered data can be processed in the handler func. -// It returns the orginal data to Stream, not the buffered slice. -func (s *StreamImpl) SlidingWindowWithCount(windowSize int, slideSize int, handler Handler, opts ...rxgo.Option) Stream { - if windowSize <= 0 { - return s.thrown(errors.New("windowSize must be positive")) - } - if slideSize <= 0 { - return s.thrown(errors.New("slideSize must be positive")) - } - - f := func(ctx context.Context, next chan rxgo.Item) { - defer close(next) - observe := s.Observe() - - windowCount := 0 - currentSlideCount := 0 - buf := make([]interface{}, windowSize) - firstTimeSend := true - mutex := sync.Mutex{} - - for { - select { - case <-ctx.Done(): - return - case item, ok := <-observe: - if !ok { - return - } - if item.Error() { - continue - } - - mutex.Lock() - if windowCount < windowSize { - buf[windowCount] = item.V - windowCount++ - } - - if windowCount == windowSize { - // start sliding - currentSlideCount++ - - // append slide item to buffer - if !firstTimeSend { - buf = append(buf[1:windowSize], item.V) - } - - // reach slide size - if currentSlideCount%slideSize == 0 { - err := handler(buf) - firstTimeSend = false - if err != nil { - rxgo.Error(err).SendContext(ctx, next) - return - } - } - } - mutex.Unlock() - // immediately send the original item to downstream - Of(item.V).SendContext(ctx, next) - } - } - } - return CreateObservable(s.ctx, f, opts...) -} - -// SlidingWindowWithTime buffers the data in the specified sliding window time, the buffered data can be processed in the handler func. -// It returns the orginal data to Stream, not the buffered slice. -func (s *StreamImpl) SlidingWindowWithTime(windowTimeInMS uint32, slideTimeInMS uint32, handler Handler, opts ...rxgo.Option) Stream { - f := func(ctx context.Context, next chan rxgo.Item) { - observe := s.Observe() - buf := make([]slidingWithTimeItem, 0) - stop := make(chan struct{}) - firstTimeSend := true - mutex := sync.Mutex{} - - checkBuffer := func() { - mutex.Lock() - // filter items by time - updatedBuf := make([]slidingWithTimeItem, 0) - availableItems := make([]interface{}, 0) - t := time.Now().Add(-time.Duration(windowTimeInMS) * time.Millisecond) - for _, item := range buf { - if item.timestamp.After(t) || item.timestamp.Equal(t) { - updatedBuf = append(updatedBuf, item) - availableItems = append(availableItems, item.data) - } - } - buf = updatedBuf - - // apply and send items - if len(availableItems) != 0 { - err := handler(availableItems) - if err != nil { - rxgo.Error(err).SendContext(ctx, next) - return - } - } - firstTimeSend = false - mutex.Unlock() - } - - go func() { - defer close(next) - for { - select { - case <-stop: - checkBuffer() - return - case <-ctx.Done(): - return - case <-time.After(time.Duration(windowTimeInMS) * time.Millisecond): - if firstTimeSend { - checkBuffer() - } - case <-time.After(time.Duration(slideTimeInMS) * time.Millisecond): - checkBuffer() - } - } - }() - - for { - select { - case <-ctx.Done(): - close(stop) - return - case item, ok := <-observe: - if !ok { - close(stop) - return - } - if item.Error() { - continue - } - mutex.Lock() - // buffer data - buf = append(buf, slidingWithTimeItem{ - timestamp: time.Now(), - data: item.V, - }) - mutex.Unlock() - // immediately send the original item to downstream - Of(item.V).SendContext(ctx, next) - } - } - } - return CreateObservable(s.ctx, f, opts...) -} - -type slidingWithTimeItem struct { - timestamp time.Time - data interface{} -} - -// Handler defines a function that handle the input value. -type Handler func(interface{}) error - -func (s *StreamImpl) thrown(err error) Stream { - next := make(chan rxgo.Item, 1) - next <- rxgo.Error(err) - defer close(next) - return &StreamImpl{observable: rxgo.FromChannel(next)} -} - -// CreateObservable creates a new observable. -func CreateObservable(ctx context.Context, f func(ctx context.Context, next chan rxgo.Item), opts ...rxgo.Option) Stream { - next := make(chan rxgo.Item) - if ctx == nil { - ctx = context.Background() - } - go f(ctx, next) - opts = appendContinueOnError(ctx, opts...) - return &StreamImpl{ctx: ctx, observable: rxgo.FromChannel(next, opts...)} -} - -// CreateZipperObservable creates a new observable with the capacity 100 for Zipper. -func CreateZipperObservable(ctx context.Context, f func(ctx context.Context, next chan rxgo.Item), opts ...rxgo.Option) Stream { - next := make(chan rxgo.Item, 100) - if ctx == nil { - ctx = context.Background() - } - go f(ctx, next) - opts = appendContinueOnError(ctx, opts...) - return &StreamImpl{ctx: ctx, observable: rxgo.FromChannel(next, opts...)} -} - -// ConvertObservable converts the observable to RxStream. -func ConvertObservable(ctx context.Context, observable rxgo.Observable) Stream { - if ctx == nil { - ctx = context.Background() - } - return &StreamImpl{ctx: ctx, observable: observable} -} From 3f0e7e2e27682b9b7f67b3b3db8e4d1123132c82 Mon Sep 17 00:00:00 2001 From: woorui Date: Mon, 25 Nov 2024 16:46:58 +0800 Subject: [PATCH 2/3] build: go mod tidy example --- example/1-pipeline/go.mod | 26 ++++----- example/1-pipeline/go.sum | 56 +++++++++---------- .../10-ai/llm-sfn-currency-converter/go.mod | 2 +- .../10-ai/llm-sfn-currency-converter/go.sum | 4 +- .../10-ai/llm-sfn-get-ip-and-latency/go.mod | 8 +-- .../10-ai/llm-sfn-get-ip-and-latency/go.sum | 16 +++--- example/10-ai/llm-sfn-get-weather/go.mod | 2 +- example/10-ai/llm-sfn-get-weather/go.sum | 4 +- .../10-ai/llm-sfn-timezone-calculator/go.mod | 2 +- .../10-ai/llm-sfn-timezone-calculator/go.sum | 4 +- example/2-iopipe/go.mod | 26 ++++----- example/2-iopipe/go.sum | 56 +++++++++---------- example/7-wasm/sfn/go-http/go.mod | 2 +- example/7-wasm/sfn/go-http/go.sum | 4 +- example/7-wasm/sfn/go/go.mod | 2 +- example/7-wasm/sfn/go/go.sum | 4 +- example/9-cli/sfn/go.mod | 2 +- example/9-cli/sfn/go.sum | 4 +- example/9-cli/source/go.mod | 26 ++++----- example/9-cli/source/go.sum | 56 +++++++++---------- 20 files changed, 153 insertions(+), 153 deletions(-) diff --git a/example/1-pipeline/go.mod b/example/1-pipeline/go.mod index 471ea0793..c60db50dc 100644 --- a/example/1-pipeline/go.mod +++ b/example/1-pipeline/go.mod @@ -12,7 +12,7 @@ require ( github.com/buger/jsonparser v1.1.1 // indirect github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -29,7 +29,7 @@ require ( github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/quic-go/quic-go v0.46.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect @@ -38,23 +38,23 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/tools v0.24.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/example/1-pipeline/go.sum b/example/1-pipeline/go.sum index cde82d4d0..fc54056bf 100644 --- a/example/1-pipeline/go.sum +++ b/example/1-pipeline/go.sum @@ -29,8 +29,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= @@ -125,8 +125,8 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -177,8 +177,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -190,8 +190,8 @@ golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -208,8 +208,8 @@ golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -219,8 +219,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -228,18 +228,18 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -258,18 +258,18 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/example/10-ai/llm-sfn-currency-converter/go.mod b/example/10-ai/llm-sfn-currency-converter/go.mod index 1af850dfd..516d0184f 100644 --- a/example/10-ai/llm-sfn-currency-converter/go.mod +++ b/example/10-ai/llm-sfn-currency-converter/go.mod @@ -14,7 +14,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/lmittmann/tint v1.0.4 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/example/10-ai/llm-sfn-currency-converter/go.sum b/example/10-ai/llm-sfn-currency-converter/go.sum index 27e1d11c1..b73467134 100644 --- a/example/10-ai/llm-sfn-currency-converter/go.sum +++ b/example/10-ai/llm-sfn-currency-converter/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/example/10-ai/llm-sfn-get-ip-and-latency/go.mod b/example/10-ai/llm-sfn-get-ip-and-latency/go.mod index e97187e71..77454e13e 100644 --- a/example/10-ai/llm-sfn-get-ip-and-latency/go.mod +++ b/example/10-ai/llm-sfn-get-ip-and-latency/go.mod @@ -13,9 +13,9 @@ require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/10-ai/llm-sfn-get-ip-and-latency/go.sum b/example/10-ai/llm-sfn-get-ip-and-latency/go.sum index baa13ccc9..7ce97ff5e 100644 --- a/example/10-ai/llm-sfn-get-ip-and-latency/go.sum +++ b/example/10-ai/llm-sfn-get-ip-and-latency/go.sum @@ -11,20 +11,20 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/example/10-ai/llm-sfn-get-weather/go.mod b/example/10-ai/llm-sfn-get-weather/go.mod index 2b8fe6a96..540927447 100644 --- a/example/10-ai/llm-sfn-get-weather/go.mod +++ b/example/10-ai/llm-sfn-get-weather/go.mod @@ -7,7 +7,7 @@ require github.com/yomorun/yomo v1.18.7 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/10-ai/llm-sfn-get-weather/go.sum b/example/10-ai/llm-sfn-get-weather/go.sum index 6c1ad95c1..1ff2f13a9 100644 --- a/example/10-ai/llm-sfn-get-weather/go.sum +++ b/example/10-ai/llm-sfn-get-weather/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/10-ai/llm-sfn-timezone-calculator/go.mod b/example/10-ai/llm-sfn-timezone-calculator/go.mod index df2313992..5cbbd5106 100644 --- a/example/10-ai/llm-sfn-timezone-calculator/go.mod +++ b/example/10-ai/llm-sfn-timezone-calculator/go.mod @@ -7,7 +7,7 @@ require github.com/yomorun/yomo v1.18.8 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/10-ai/llm-sfn-timezone-calculator/go.sum b/example/10-ai/llm-sfn-timezone-calculator/go.sum index 6c1ad95c1..1ff2f13a9 100644 --- a/example/10-ai/llm-sfn-timezone-calculator/go.sum +++ b/example/10-ai/llm-sfn-timezone-calculator/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/2-iopipe/go.mod b/example/2-iopipe/go.mod index a09bd0c0e..0ce132f08 100644 --- a/example/2-iopipe/go.mod +++ b/example/2-iopipe/go.mod @@ -12,7 +12,7 @@ require ( github.com/buger/jsonparser v1.1.1 // indirect github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -29,7 +29,7 @@ require ( github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/quic-go/quic-go v0.46.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect @@ -38,23 +38,23 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/tools v0.24.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/example/2-iopipe/go.sum b/example/2-iopipe/go.sum index cde82d4d0..fc54056bf 100644 --- a/example/2-iopipe/go.sum +++ b/example/2-iopipe/go.sum @@ -29,8 +29,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= @@ -125,8 +125,8 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -177,8 +177,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -190,8 +190,8 @@ golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -208,8 +208,8 @@ golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -219,8 +219,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -228,18 +228,18 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -258,18 +258,18 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/example/7-wasm/sfn/go-http/go.mod b/example/7-wasm/sfn/go-http/go.mod index e2579a42a..3bc4f3dc6 100644 --- a/example/7-wasm/sfn/go-http/go.mod +++ b/example/7-wasm/sfn/go-http/go.mod @@ -9,6 +9,6 @@ require github.com/yomorun/yomo v0.0.0 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/7-wasm/sfn/go-http/go.sum b/example/7-wasm/sfn/go-http/go.sum index 6c1ad95c1..1ff2f13a9 100644 --- a/example/7-wasm/sfn/go-http/go.sum +++ b/example/7-wasm/sfn/go-http/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/7-wasm/sfn/go/go.mod b/example/7-wasm/sfn/go/go.mod index e2579a42a..3bc4f3dc6 100644 --- a/example/7-wasm/sfn/go/go.mod +++ b/example/7-wasm/sfn/go/go.mod @@ -9,6 +9,6 @@ require github.com/yomorun/yomo v0.0.0 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/7-wasm/sfn/go/go.sum b/example/7-wasm/sfn/go/go.sum index 6c1ad95c1..1ff2f13a9 100644 --- a/example/7-wasm/sfn/go/go.sum +++ b/example/7-wasm/sfn/go/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/9-cli/sfn/go.mod b/example/9-cli/sfn/go.mod index 14c6ab808..66a7fab12 100644 --- a/example/9-cli/sfn/go.mod +++ b/example/9-cli/sfn/go.mod @@ -12,7 +12,7 @@ require ( require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect diff --git a/example/9-cli/sfn/go.sum b/example/9-cli/sfn/go.sum index 6fb5ce02f..c7c9c0b34 100644 --- a/example/9-cli/sfn/go.sum +++ b/example/9-cli/sfn/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= diff --git a/example/9-cli/source/go.mod b/example/9-cli/source/go.mod index 4d94a96f0..c33b5f8dd 100644 --- a/example/9-cli/source/go.mod +++ b/example/9-cli/source/go.mod @@ -12,7 +12,7 @@ require ( github.com/buger/jsonparser v1.1.1 // indirect github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -29,7 +29,7 @@ require ( github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/quic-go/quic-go v0.46.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sashabaranov/go-openai v1.32.2 // indirect + github.com/sashabaranov/go-openai v1.35.6 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect @@ -38,23 +38,23 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/tools v0.24.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/example/9-cli/source/go.sum b/example/9-cli/source/go.sum index cde82d4d0..fc54056bf 100644 --- a/example/9-cli/source/go.sum +++ b/example/9-cli/source/go.sum @@ -29,8 +29,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= @@ -125,8 +125,8 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sashabaranov/go-openai v1.32.2 h1:8z9PfYaLPbRzmJIYpwcWu6z3XU8F+RwVMF1QRSeSF2M= -github.com/sashabaranov/go-openai v1.32.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= +github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -177,8 +177,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -190,8 +190,8 @@ golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -208,8 +208,8 @@ golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -219,8 +219,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -228,18 +228,18 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -258,18 +258,18 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From d7b424de709656f9a3067cf4c23a77cb603f1bf6 Mon Sep 17 00:00:00 2001 From: woorui Date: Tue, 26 Nov 2024 11:11:27 +0800 Subject: [PATCH 3/3] bunp go-openai to v1.35.7 --- example/1-pipeline/go.mod | 2 +- example/1-pipeline/go.sum | 4 ++-- example/10-ai/llm-sfn-currency-converter/go.mod | 2 +- example/10-ai/llm-sfn-currency-converter/go.sum | 4 ++-- example/10-ai/llm-sfn-get-ip-and-latency/go.mod | 2 +- example/10-ai/llm-sfn-get-ip-and-latency/go.sum | 4 ++-- example/10-ai/llm-sfn-get-weather/go.mod | 2 +- example/10-ai/llm-sfn-get-weather/go.sum | 4 ++-- example/10-ai/llm-sfn-timezone-calculator/go.mod | 2 +- example/10-ai/llm-sfn-timezone-calculator/go.sum | 4 ++-- example/2-iopipe/go.mod | 2 +- example/2-iopipe/go.sum | 4 ++-- example/7-wasm/sfn/go-http/go.mod | 2 +- example/7-wasm/sfn/go-http/go.sum | 4 ++-- example/7-wasm/sfn/go/go.mod | 2 +- example/7-wasm/sfn/go/go.sum | 4 ++-- example/9-cli/sfn/go.mod | 2 +- example/9-cli/sfn/go.sum | 4 ++-- example/9-cli/source/go.mod | 2 +- example/9-cli/source/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 22 files changed, 33 insertions(+), 33 deletions(-) diff --git a/example/1-pipeline/go.mod b/example/1-pipeline/go.mod index c60db50dc..710042369 100644 --- a/example/1-pipeline/go.mod +++ b/example/1-pipeline/go.mod @@ -29,7 +29,7 @@ require ( github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/quic-go/quic-go v0.46.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect diff --git a/example/1-pipeline/go.sum b/example/1-pipeline/go.sum index fc54056bf..9686bd4fd 100644 --- a/example/1-pipeline/go.sum +++ b/example/1-pipeline/go.sum @@ -125,8 +125,8 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= diff --git a/example/10-ai/llm-sfn-currency-converter/go.mod b/example/10-ai/llm-sfn-currency-converter/go.mod index 516d0184f..9dfeea4a9 100644 --- a/example/10-ai/llm-sfn-currency-converter/go.mod +++ b/example/10-ai/llm-sfn-currency-converter/go.mod @@ -14,7 +14,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/lmittmann/tint v1.0.4 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/example/10-ai/llm-sfn-currency-converter/go.sum b/example/10-ai/llm-sfn-currency-converter/go.sum index b73467134..004c06c5d 100644 --- a/example/10-ai/llm-sfn-currency-converter/go.sum +++ b/example/10-ai/llm-sfn-currency-converter/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/example/10-ai/llm-sfn-get-ip-and-latency/go.mod b/example/10-ai/llm-sfn-get-ip-and-latency/go.mod index 77454e13e..6cbef4ee9 100644 --- a/example/10-ai/llm-sfn-get-ip-and-latency/go.mod +++ b/example/10-ai/llm-sfn-get-ip-and-latency/go.mod @@ -13,7 +13,7 @@ require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect golang.org/x/net v0.31.0 // indirect golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.27.0 // indirect diff --git a/example/10-ai/llm-sfn-get-ip-and-latency/go.sum b/example/10-ai/llm-sfn-get-ip-and-latency/go.sum index 7ce97ff5e..7ed484acf 100644 --- a/example/10-ai/llm-sfn-get-ip-and-latency/go.sum +++ b/example/10-ai/llm-sfn-get-ip-and-latency/go.sum @@ -11,8 +11,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= diff --git a/example/10-ai/llm-sfn-get-weather/go.mod b/example/10-ai/llm-sfn-get-weather/go.mod index 540927447..36489acc3 100644 --- a/example/10-ai/llm-sfn-get-weather/go.mod +++ b/example/10-ai/llm-sfn-get-weather/go.mod @@ -7,7 +7,7 @@ require github.com/yomorun/yomo v1.18.7 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/10-ai/llm-sfn-get-weather/go.sum b/example/10-ai/llm-sfn-get-weather/go.sum index 1ff2f13a9..f8f81a0a9 100644 --- a/example/10-ai/llm-sfn-get-weather/go.sum +++ b/example/10-ai/llm-sfn-get-weather/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/10-ai/llm-sfn-timezone-calculator/go.mod b/example/10-ai/llm-sfn-timezone-calculator/go.mod index 5cbbd5106..cb559f171 100644 --- a/example/10-ai/llm-sfn-timezone-calculator/go.mod +++ b/example/10-ai/llm-sfn-timezone-calculator/go.mod @@ -7,7 +7,7 @@ require github.com/yomorun/yomo v1.18.8 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/10-ai/llm-sfn-timezone-calculator/go.sum b/example/10-ai/llm-sfn-timezone-calculator/go.sum index 1ff2f13a9..f8f81a0a9 100644 --- a/example/10-ai/llm-sfn-timezone-calculator/go.sum +++ b/example/10-ai/llm-sfn-timezone-calculator/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/2-iopipe/go.mod b/example/2-iopipe/go.mod index 0ce132f08..a373e337f 100644 --- a/example/2-iopipe/go.mod +++ b/example/2-iopipe/go.mod @@ -29,7 +29,7 @@ require ( github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/quic-go/quic-go v0.46.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect diff --git a/example/2-iopipe/go.sum b/example/2-iopipe/go.sum index fc54056bf..9686bd4fd 100644 --- a/example/2-iopipe/go.sum +++ b/example/2-iopipe/go.sum @@ -125,8 +125,8 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= diff --git a/example/7-wasm/sfn/go-http/go.mod b/example/7-wasm/sfn/go-http/go.mod index 3bc4f3dc6..5799420f2 100644 --- a/example/7-wasm/sfn/go-http/go.mod +++ b/example/7-wasm/sfn/go-http/go.mod @@ -9,6 +9,6 @@ require github.com/yomorun/yomo v0.0.0 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/7-wasm/sfn/go-http/go.sum b/example/7-wasm/sfn/go-http/go.sum index 1ff2f13a9..f8f81a0a9 100644 --- a/example/7-wasm/sfn/go-http/go.sum +++ b/example/7-wasm/sfn/go-http/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/7-wasm/sfn/go/go.mod b/example/7-wasm/sfn/go/go.mod index 3bc4f3dc6..5799420f2 100644 --- a/example/7-wasm/sfn/go/go.mod +++ b/example/7-wasm/sfn/go/go.mod @@ -9,6 +9,6 @@ require github.com/yomorun/yomo v0.0.0 require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) diff --git a/example/7-wasm/sfn/go/go.sum b/example/7-wasm/sfn/go/go.sum index 1ff2f13a9..f8f81a0a9 100644 --- a/example/7-wasm/sfn/go/go.sum +++ b/example/7-wasm/sfn/go/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/example/9-cli/sfn/go.mod b/example/9-cli/sfn/go.mod index 66a7fab12..167c3e192 100644 --- a/example/9-cli/sfn/go.mod +++ b/example/9-cli/sfn/go.mod @@ -12,7 +12,7 @@ require ( require ( github.com/caarlos0/env/v6 v6.10.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect diff --git a/example/9-cli/sfn/go.sum b/example/9-cli/sfn/go.sum index c7c9c0b34..b74c3f1ba 100644 --- a/example/9-cli/sfn/go.sum +++ b/example/9-cli/sfn/go.sum @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= diff --git a/example/9-cli/source/go.mod b/example/9-cli/source/go.mod index c33b5f8dd..bc2e77241 100644 --- a/example/9-cli/source/go.mod +++ b/example/9-cli/source/go.mod @@ -29,7 +29,7 @@ require ( github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/quic-go/quic-go v0.46.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sashabaranov/go-openai v1.35.6 // indirect + github.com/sashabaranov/go-openai v1.35.7 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect diff --git a/example/9-cli/source/go.sum b/example/9-cli/source/go.sum index fc54056bf..9686bd4fd 100644 --- a/example/9-cli/source/go.sum +++ b/example/9-cli/source/go.sum @@ -125,8 +125,8 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= diff --git a/go.mod b/go.mod index 6a2b8cf37..72dd9ac0f 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/matoous/go-nanoid/v2 v2.1.0 github.com/quic-go/quic-go v0.46.0 github.com/robfig/cron/v3 v3.0.1 - github.com/sashabaranov/go-openai v1.35.6 + github.com/sashabaranov/go-openai v1.35.7 github.com/second-state/WasmEdge-go v0.13.4 github.com/shirou/gopsutil/v3 v3.24.5 github.com/spf13/cobra v1.8.0 diff --git a/go.sum b/go.sum index 4dff6f477..ac2b06abe 100644 --- a/go.sum +++ b/go.sum @@ -212,8 +212,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sashabaranov/go-openai v1.35.6 h1:oi0rwCvyxMxgFALDGnyqFTyCJm6n72OnEG3sybIFR0g= -github.com/sashabaranov/go-openai v1.35.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.35.7 h1:icyrRbkYoKPa4rbO1WSInpJu3qDQrPEnsoJVZ6QymdI= +github.com/sashabaranov/go-openai v1.35.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/second-state/WasmEdge-go v0.13.4 h1:NHfJC+aayUW93ydAzlcX7Jx1WDRpI24KvY5SAbeTyvY= github.com/second-state/WasmEdge-go v0.13.4/go.mod h1:HyBf9hVj1sRAjklsjc1Yvs9b5RcmthPG9z99dY78TKg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=