diff --git a/charts/dapr/crds/pluggable-components.yaml b/charts/dapr/crds/pluggable-components.yaml index 84087d85f55..e2b3e9b5710 100644 --- a/charts/dapr/crds/pluggable-components.yaml +++ b/charts/dapr/crds/pluggable-components.yaml @@ -37,6 +37,11 @@ spec: spec: description: PluggableComponentSpec is the spec for a pluggable component. properties: + componentName: + description: + ComponentName is the component name. if not specified, + metadata.Name will be used. + type: string type: type: string version: diff --git a/dapr/proto/components/v1/bindings.proto b/dapr/proto/components/v1/bindings.proto new file mode 100644 index 00000000000..3a065ce4537 --- /dev/null +++ b/dapr/proto/components/v1/bindings.proto @@ -0,0 +1,121 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +syntax = "proto3"; + +package dapr.proto.components.v1; + +import "dapr/proto/components/v1/common.proto"; + +option go_package = "github.com/dapr/dapr/pkg/proto/components/v1;components"; + +// Interface for input bindings +service InputBinding { + // Initializes the inputbinding component component with the given metadata. + rpc Init(InputBindingInitRequest) returns (InputBindingInitResponse) {} + + // Establishes a stream with the server, which sends messages down to the + // client. The client streams acknowledgements back to the server. The server + // will close the stream and return the status on any error. In case of closed + // connection, the client should re-establish the stream. + rpc Read(stream ReadRequest) returns (stream ReadResponse) {} + + // Ping the InputBinding. Used for liveness porpuses. + rpc Ping(PingRequest) returns (PingResponse) {} +} + +service OutputBinding { + // Initializes the outputbinding component component with the given metadata. + rpc Init(OutputBindingInitRequest) returns (OutputBindingInitResponse) {} + + // Invoke remote systems with optional payloads. + rpc Invoke(InvokeRequest) returns (InvokeResponse) {} + + // ListOperations list system supported operations. + rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {} + + // Ping the OutputBinding. Used for liveness porpuses. + rpc Ping(PingRequest) returns (PingResponse) {} +} +// reserved for future-proof extensibility +message ListOperationsRequest {} + +message ListOperationsResponse { + // the list of all supported component operations. + repeated string operations = 1; +} + +// InputBindingInitRequest is the request for initializing the input binding +// component. +message InputBindingInitRequest { + // The metadata request. + MetadataRequest metadata = 1; +} + +// reserved for future-proof extensibility +message InputBindingInitResponse {} + +// OutputBindingInitRequest is the request for initializing the output binding +// component. +message OutputBindingInitRequest { + // The metadata request. + MetadataRequest metadata = 1; +} + +// reserved for future-proof extensibility +message OutputBindingInitResponse {} + +// Used for describing errors when ack'ing messages. +message AckResponseError { + string message = 1; +} + +message ReadRequest { + // The handle response. + bytes response_data = 1; + // The unique message ID. + string message_id = 2; + // Optional, should not be fulfilled when the message was successfully + // handled. + AckResponseError response_error = 3; +} + +message ReadResponse { + // The Read binding Data. + bytes data = 1; + // The message metadata + map metadata = 2; + // The message content type. + string content_type = 3; + // The {transient} message ID used for ACK-ing it later. + string message_id = 4; +} + +// Used for invoking systems with optional payload. +message InvokeRequest { + // The invoke payload. + bytes data = 1; + // The invoke metadata. + map metadata = 2; + // The system supported operation. + string operation = 3; +} + +// Response from the invoked system. +message InvokeResponse { + // The response payload. + bytes data = 1; + // The response metadata. + map metadata = 2; + // The response content-type. + string content_type = 3; +} \ No newline at end of file diff --git a/pkg/apis/components/v1alpha1/types.go b/pkg/apis/components/v1alpha1/types.go index f203682814b..1f2c4cab7a1 100644 --- a/pkg/apis/components/v1alpha1/types.go +++ b/pkg/apis/components/v1alpha1/types.go @@ -73,6 +73,9 @@ type PluggableComponentList struct { type PluggableComponentSpec struct { Type string `json:"type"` Version string `json:"version"` + // ComponentName is the component name. if not specified, metadata.Name will be used. + //+optional + ComponentName string `json:"componentName"` } // ComponentSpec is the spec for a component. diff --git a/pkg/components/bindings/input_pluggable.go b/pkg/components/bindings/input_pluggable.go new file mode 100644 index 00000000000..f1bb39f4d9e --- /dev/null +++ b/pkg/components/bindings/input_pluggable.go @@ -0,0 +1,151 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bindings + +import ( + "context" + "io" + "sync" + + "github.com/dapr/dapr/pkg/components" + "github.com/dapr/dapr/pkg/components/pluggable" + proto "github.com/dapr/dapr/pkg/proto/components/v1" + + "github.com/dapr/components-contrib/bindings" + + "github.com/dapr/kit/logger" + + "github.com/pkg/errors" +) + +// grpcInputBinding is a implementation of a inputbinding over a gRPC Protocol. +type grpcInputBinding struct { + *pluggable.GRPCConnector[proto.InputBindingClient] + bindings.InputBinding + logger logger.Logger +} + +// Init initializes the grpc inputbinding passing out the metadata to the grpc component. +func (b *grpcInputBinding) Init(metadata bindings.Metadata) error { + if err := b.Dial(metadata.Name); err != nil { + return err + } + + protoMetadata := &proto.MetadataRequest{ + Properties: metadata.Properties, + } + + _, err := b.Client.Init(b.Context, &proto.InputBindingInitRequest{ + Metadata: protoMetadata, + }) + return err +} + +type readHandler = func(*proto.ReadResponse) + +// adaptHandler returns a non-error function that handle the message with the given handler and ack when returns. +// +//nolint:nosnakecase +func (b *grpcInputBinding) adaptHandler(ctx context.Context, streamingPull proto.InputBinding_ReadClient, handler bindings.Handler) readHandler { + safeSend := &sync.Mutex{} + return func(msg *proto.ReadResponse) { + var contentType *string + if len(msg.ContentType) != 0 { + contentType = &msg.ContentType + } + m := bindings.ReadResponse{ + Data: msg.Data, + Metadata: msg.Metadata, + ContentType: contentType, + } + + var respErr *proto.AckResponseError + bts, err := handler(ctx, &m) + if err != nil { + b.logger.Errorf("error when handling message for message: %s", msg.MessageId) + respErr = &proto.AckResponseError{ + Message: err.Error(), + } + } + + // As per documentation: + // When using streams, + // one must take care to avoid calling either SendMsg or RecvMsg multiple times against the same Stream from different goroutines. + // In other words, it's safe to have a goroutine calling SendMsg and another goroutine calling RecvMsg on the same stream at the same time. + // But it is not safe to call SendMsg on the same stream in different goroutines, or to call RecvMsg on the same stream in different goroutines. + // https://github.com/grpc/grpc-go/blob/master/Documentation/concurrency.md#streams + safeSend.Lock() + defer safeSend.Unlock() + + if err := streamingPull.Send(&proto.ReadRequest{ + ResponseData: bts, + ResponseError: respErr, + MessageId: msg.MessageId, + }); err != nil { + b.logger.Errorf("error when ack'ing message %s", msg.MessageId) + } + } +} + +// Read starts a bi-di stream reading messages from component and handling it used the given handler. +func (b *grpcInputBinding) Read(ctx context.Context, handler bindings.Handler) error { + readStream, err := b.Client.Read(ctx) + if err != nil { + return errors.Wrapf(err, "unable to read from binding") + } + + streamCtx, cancel := context.WithCancel(readStream.Context()) + handle := b.adaptHandler(streamCtx, readStream, handler) + + go func() { + defer cancel() + for { + msg, err := readStream.Recv() + if err == io.EOF { // no more reads + return + } + + // TODO reconnect on error + if err != nil { + b.logger.Errorf("failed to receive message: %v", err) + return + } + go handle(msg) + } + }() + + return nil +} + +// inputFromConnector creates a new GRPC inputbinding using the given underlying connector. +func inputFromConnector(l logger.Logger, connector *pluggable.GRPCConnector[proto.InputBindingClient]) *grpcInputBinding { + return &grpcInputBinding{ + GRPCConnector: connector, + logger: l, + } +} + +// NewGRPCInputBinding creates a new grpc inputbindingusing the given socket factory. +func NewGRPCInputBinding(l logger.Logger, socketFactory func(string) string) *grpcInputBinding { + return inputFromConnector(l, pluggable.NewGRPCConnectorWithFactory(socketFactory, proto.NewInputBindingClient)) +} + +// newGRPCInputBinding creates a new input binding for the given pluggable component. +func newGRPCInputBinding(l logger.Logger, pc components.Pluggable) bindings.InputBinding { + return inputFromConnector(l, pluggable.NewGRPCConnector(pc, proto.NewInputBindingClient)) +} + +func init() { + pluggable.AddRegistryFor(components.InputBinding, DefaultRegistry.RegisterInputBinding, newGRPCInputBinding) +} diff --git a/pkg/components/bindings/input_pluggable_test.go b/pkg/components/bindings/input_pluggable_test.go new file mode 100644 index 00000000000..83bacefa39d --- /dev/null +++ b/pkg/components/bindings/input_pluggable_test.go @@ -0,0 +1,205 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bindings + +import ( + "context" + "errors" + "fmt" + "net" + "os" + "runtime" + "sync" + "testing" + + "github.com/dapr/components-contrib/bindings" + contribMetadata "github.com/dapr/components-contrib/metadata" + + "github.com/dapr/dapr/pkg/components" + "github.com/dapr/dapr/pkg/components/pluggable" + proto "github.com/dapr/dapr/pkg/proto/components/v1" + testingGrpc "github.com/dapr/dapr/pkg/testing/grpc" + + guuid "github.com/google/uuid" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.uber.org/atomic" + + "github.com/dapr/kit/logger" + + "google.golang.org/grpc" +) + +type inputBindingServer struct { + proto.UnimplementedInputBindingServer + initCalled atomic.Int64 + initErr error + onInitCalled func(*proto.InputBindingInitRequest) + readCalled atomic.Int64 + readResponseChan chan *proto.ReadResponse + readErr error + onReadRequestReceived func(*proto.ReadRequest) +} + +func (b *inputBindingServer) Init(_ context.Context, req *proto.InputBindingInitRequest) (*proto.InputBindingInitResponse, error) { + b.initCalled.Add(1) + if b.onInitCalled != nil { + b.onInitCalled(req) + } + return &proto.InputBindingInitResponse{}, b.initErr +} + +//nolint:nosnakecase +func (b *inputBindingServer) Read(stream proto.InputBinding_ReadServer) error { + b.readCalled.Add(1) + if b.onReadRequestReceived != nil { + go func() { + for { + msg, err := stream.Recv() + if err != nil { + return + } + b.onReadRequestReceived(msg) + } + }() + } + if b.readResponseChan != nil { + for resp := range b.readResponseChan { + if err := stream.Send(resp); err != nil { + return err + } + } + } + return b.readErr +} + +func (b *inputBindingServer) Ping(context.Context, *proto.PingRequest) (*proto.PingResponse, error) { + return &proto.PingResponse{}, nil +} + +var testLogger = logger.NewLogger("bindings-test-pluggable-logger") + +func TestInputBindingCalls(t *testing.T) { + getInputBinding := testingGrpc.TestServerFor(testLogger, func(s *grpc.Server, svc *inputBindingServer) { + proto.RegisterInputBindingServer(s, svc) + }, func(cci grpc.ClientConnInterface) *grpcInputBinding { + client := proto.NewInputBindingClient(cci) + inbinding := inputFromConnector(testLogger, pluggable.NewGRPCConnector(components.Pluggable{}, proto.NewInputBindingClient)) + inbinding.Client = client + return inbinding + }) + if runtime.GOOS != "windows" { + t.Run("test init should populate features and call grpc init", func(t *testing.T) { + const ( + fakeName = "name" + fakeType = "type" + fakeVersion = "v1" + fakeComponentName = "component" + fakeSocketFolder = "/tmp" + ) + + uniqueID := guuid.New().String() + socket := fmt.Sprintf("%s/%s.sock", fakeSocketFolder, uniqueID) + defer os.Remove(socket) + + connector := pluggable.NewGRPCConnectorWithFactory(func(string) string { + return socket + }, proto.NewInputBindingClient) + defer connector.Close() + + listener, err := net.Listen("unix", socket) + require.NoError(t, err) + defer listener.Close() + s := grpc.NewServer() + srv := &inputBindingServer{} + proto.RegisterInputBindingServer(s, srv) + go func() { + if serveErr := s.Serve(listener); serveErr != nil { + testLogger.Debugf("Server exited with error: %v", serveErr) + } + }() + + conn := inputFromConnector(testLogger, connector) + err = conn.Init(bindings.Metadata{ + Base: contribMetadata.Base{}, + }) + + require.NoError(t, err) + assert.Equal(t, int64(1), srv.initCalled.Load()) + }) + } + + t.Run("read should callback handler when new messages are available", func(t *testing.T) { + const fakeData1, fakeData2 = "fakeData1", "fakeData2" + messagesData := [][]byte{[]byte(fakeData1), []byte(fakeData2)} + var ( + messagesAcked sync.WaitGroup + messagesProcessed sync.WaitGroup + totalResponseErrors atomic.Int64 + handleCalled atomic.Int64 + ) + + messages := make([]*proto.ReadResponse, len(messagesData)) + + for idx, data := range messagesData { + messages[idx] = &proto.ReadResponse{ + Data: data, + } + } + + messagesAcked.Add(len(messages)) + messagesProcessed.Add(len(messages)) + + messageChan := make(chan *proto.ReadResponse, len(messages)) + defer close(messageChan) + + for _, message := range messages { + messageChan <- message + } + + srv := &inputBindingServer{ + readResponseChan: messageChan, + onReadRequestReceived: func(ma *proto.ReadRequest) { + messagesAcked.Done() + if ma.ResponseError != nil { + totalResponseErrors.Add(1) + } + }, + } + + handleErrors := make(chan error, 1) // simulating an ack error + handleErrors <- errors.New("fake-error") + close(handleErrors) + + binding, cleanup, err := getInputBinding(srv) + require.NoError(t, err) + defer cleanup() + + err = binding.Read(context.Background(), func(_ context.Context, resp *bindings.ReadResponse) ([]byte, error) { + handleCalled.Add(1) + messagesProcessed.Done() + assert.Contains(t, messagesData, resp.Data) + return []byte{}, <-handleErrors + }) + require.NoError(t, err) + + messagesProcessed.Wait() + messagesAcked.Wait() + + assert.Equal(t, int64(len(messages)), handleCalled.Load()) + assert.Equal(t, int64(1), totalResponseErrors.Load()) // at least one message should be an error + }) +} diff --git a/pkg/components/bindings/output_pluggable.go b/pkg/components/bindings/output_pluggable.go new file mode 100644 index 00000000000..9ca90b980ee --- /dev/null +++ b/pkg/components/bindings/output_pluggable.go @@ -0,0 +1,113 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bindings + +import ( + "context" + + "github.com/dapr/components-contrib/bindings" + "github.com/dapr/dapr/pkg/components" + "github.com/dapr/dapr/pkg/components/pluggable" + proto "github.com/dapr/dapr/pkg/proto/components/v1" + "github.com/dapr/kit/logger" +) + +// grpcOutputBinding is a implementation of a outputbinding over a gRPC Protocol. +type grpcOutputBinding struct { + *pluggable.GRPCConnector[proto.OutputBindingClient] + bindings.OutputBinding + operations []bindings.OperationKind +} + +// Init initializes the grpc outputbinding passing out the metadata to the grpc component. +func (b *grpcOutputBinding) Init(metadata bindings.Metadata) error { + if err := b.Dial(metadata.Name); err != nil { + return err + } + + protoMetadata := &proto.MetadataRequest{ + Properties: metadata.Properties, + } + + _, err := b.Client.Init(b.Context, &proto.OutputBindingInitRequest{ + Metadata: protoMetadata, + }) + if err != nil { + return err + } + + operations, err := b.Client.ListOperations(b.Context, &proto.ListOperationsRequest{}) + if err != nil { + return err + } + + operationsList := operations.GetOperations() + ops := make([]bindings.OperationKind, len(operationsList)) + + for idx, op := range operationsList { + ops[idx] = bindings.OperationKind(op) + } + b.operations = ops + + return nil +} + +// Operations list bindings operations. +func (b *grpcOutputBinding) Operations() []bindings.OperationKind { + return b.operations +} + +// Invoke the component with the given payload, metadata and operation. +func (b *grpcOutputBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error) { + resp, err := b.Client.Invoke(ctx, &proto.InvokeRequest{ + Data: req.Data, + Metadata: req.Metadata, + Operation: string(req.Operation), + }) + if err != nil { + return nil, err + } + + var contentType *string + if len(resp.ContentType) != 0 { + contentType = &resp.ContentType + } + + return &bindings.InvokeResponse{ + Data: resp.Data, + Metadata: resp.Metadata, + ContentType: contentType, + }, nil +} + +// outputFromConnector creates a new GRPC outputbinding using the given underlying connector. +func outputFromConnector(_ logger.Logger, connector *pluggable.GRPCConnector[proto.OutputBindingClient]) *grpcOutputBinding { + return &grpcOutputBinding{ + GRPCConnector: connector, + } +} + +// NewGRPCOutputBinding creates a new grpc outputbinding using the given socket factory. +func NewGRPCOutputBinding(l logger.Logger, socketFactory func(string) string) *grpcOutputBinding { + return outputFromConnector(l, pluggable.NewGRPCConnectorWithFactory(socketFactory, proto.NewOutputBindingClient)) +} + +// newGRPCOutputBinding creates a new output binding for the given pluggable component. +func newGRPCOutputBinding(l logger.Logger, pc components.Pluggable) bindings.OutputBinding { + return outputFromConnector(l, pluggable.NewGRPCConnector(pc, proto.NewOutputBindingClient)) +} + +func init() { + pluggable.AddRegistryFor(components.OutputBinding, DefaultRegistry.RegisterOutputBinding, newGRPCOutputBinding) +} diff --git a/pkg/components/bindings/output_pluggable_test.go b/pkg/components/bindings/output_pluggable_test.go new file mode 100644 index 00000000000..d739bad104d --- /dev/null +++ b/pkg/components/bindings/output_pluggable_test.go @@ -0,0 +1,205 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bindings + +import ( + "context" + "errors" + "fmt" + "net" + "os" + "runtime" + "sync/atomic" + "testing" + + guuid "github.com/google/uuid" + + "github.com/dapr/components-contrib/bindings" + "github.com/dapr/dapr/pkg/components" + "github.com/dapr/dapr/pkg/components/pluggable" + proto "github.com/dapr/dapr/pkg/proto/components/v1" + testingGrpc "github.com/dapr/dapr/pkg/testing/grpc" + + contribMetadata "github.com/dapr/components-contrib/metadata" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "google.golang.org/grpc" +) + +type outputBindingServer struct { + proto.UnimplementedOutputBindingServer + initCalled atomic.Int64 + initErr error + onInitCalled func(*proto.OutputBindingInitRequest) + invokeCalled atomic.Int64 + invokeErr error + onInvokeCalled func(*proto.InvokeRequest) + invokeResp *proto.InvokeResponse + listOperationsCalled atomic.Int64 + listOperationsErr error + listOperationsResp *proto.ListOperationsResponse +} + +func (b *outputBindingServer) Init(_ context.Context, req *proto.OutputBindingInitRequest) (*proto.OutputBindingInitResponse, error) { + b.initCalled.Add(1) + if b.onInitCalled != nil { + b.onInitCalled(req) + } + return &proto.OutputBindingInitResponse{}, b.initErr +} + +func (b *outputBindingServer) Invoke(_ context.Context, req *proto.InvokeRequest) (*proto.InvokeResponse, error) { + b.invokeCalled.Add(1) + if b.onInvokeCalled != nil { + b.onInvokeCalled(req) + } + return b.invokeResp, b.invokeErr +} + +func (b *outputBindingServer) ListOperations(context.Context, *proto.ListOperationsRequest) (*proto.ListOperationsResponse, error) { + b.listOperationsCalled.Add(1) + resp := b.listOperationsResp + if resp == nil { + resp = &proto.ListOperationsResponse{} + } + return resp, b.listOperationsErr +} + +func (b *outputBindingServer) Ping(context.Context, *proto.PingRequest) (*proto.PingResponse, error) { + return &proto.PingResponse{}, nil +} + +func TestOutputBindingCalls(t *testing.T) { + getOutputBinding := testingGrpc.TestServerFor(testLogger, func(s *grpc.Server, svc *outputBindingServer) { + proto.RegisterOutputBindingServer(s, svc) + }, func(cci grpc.ClientConnInterface) *grpcOutputBinding { + client := proto.NewOutputBindingClient(cci) + outbinding := outputFromConnector(testLogger, pluggable.NewGRPCConnector(components.Pluggable{}, proto.NewOutputBindingClient)) + outbinding.Client = client + return outbinding + }) + if runtime.GOOS != "windows" { + t.Run("test init should populate features and call grpc init", func(t *testing.T) { + const ( + fakeName = "name" + fakeType = "type" + fakeVersion = "v1" + fakeComponentName = "component" + fakeSocketFolder = "/tmp" + fakeOperation = "fake" + ) + + fakeOperations := []string{fakeOperation} + + uniqueID := guuid.New().String() + socket := fmt.Sprintf("%s/%s.sock", fakeSocketFolder, uniqueID) + defer os.Remove(socket) + + connector := pluggable.NewGRPCConnectorWithFactory(func(string) string { + return socket + }, proto.NewOutputBindingClient) + defer connector.Close() + + listener, err := net.Listen("unix", socket) + require.NoError(t, err) + defer listener.Close() + s := grpc.NewServer() + srv := &outputBindingServer{ + listOperationsResp: &proto.ListOperationsResponse{ + Operations: fakeOperations, + }, + } + proto.RegisterOutputBindingServer(s, srv) + go func() { + if serveErr := s.Serve(listener); serveErr != nil { + testLogger.Debugf("Server exited with error: %v", serveErr) + } + }() + + conn := outputFromConnector(testLogger, connector) + err = conn.Init(bindings.Metadata{ + Base: contribMetadata.Base{}, + }) + + require.NoError(t, err) + assert.Equal(t, int64(1), srv.listOperationsCalled.Load()) + assert.Equal(t, int64(1), srv.initCalled.Load()) + assert.ElementsMatch(t, conn.operations, []bindings.OperationKind{fakeOperation}) + }) + } + + t.Run("list operations should return operations when set", func(t *testing.T) { + const fakeOperation = "fake" + ops := []bindings.OperationKind{fakeOperation} + outputGrpc := &grpcOutputBinding{ + operations: ops, + } + + assert.Equal(t, ops, outputGrpc.Operations()) + }) + + t.Run("invoke should call grpc invoke when called", func(t *testing.T) { + const fakeOp, fakeMetadataKey, fakeMetadataValue = "fake-op", "fake-key", "fake-value" + fakeDataResp := []byte("fake-resp") + + fakeDataReq := []byte("fake-req") + fakeMetadata := map[string]string{ + fakeMetadataKey: fakeMetadataValue, + } + + srv := &outputBindingServer{ + invokeResp: &proto.InvokeResponse{ + Data: fakeDataResp, + Metadata: fakeMetadata, + }, + onInvokeCalled: func(ir *proto.InvokeRequest) { + assert.Equal(t, ir.Operation, fakeOp) + }, + } + + outputSvc, cleanup, err := getOutputBinding(srv) + defer cleanup() + require.NoError(t, err) + + resp, err := outputSvc.Invoke(context.Background(), &bindings.InvokeRequest{ + Data: fakeDataReq, + Metadata: fakeMetadata, + Operation: fakeOp, + }) + + require.NoError(t, err) + + assert.Equal(t, int64(1), srv.invokeCalled.Load()) + assert.Equal(t, resp.Data, fakeDataResp) + }) + + t.Run("invoke should return an error if grpc method returns an error", func(t *testing.T) { + const errStr = "fake-invoke-err" + + srv := &outputBindingServer{ + invokeErr: errors.New(errStr), + } + + outputSvc, cleanup, err := getOutputBinding(srv) + defer cleanup() + require.NoError(t, err) + + _, err = outputSvc.Invoke(context.Background(), &bindings.InvokeRequest{}) + + assert.NotNil(t, err) + assert.Equal(t, int64(1), srv.invokeCalled.Load()) + }) +} diff --git a/pkg/components/bindings/registry.go b/pkg/components/bindings/registry.go index 3a6d738eec4..1213fe65a91 100644 --- a/pkg/components/bindings/registry.go +++ b/pkg/components/bindings/registry.go @@ -31,11 +31,7 @@ type Registry struct { } // DefaultRegistry is the singleton with the registry. -var DefaultRegistry *Registry - -func init() { - DefaultRegistry = NewRegistry() -} +var DefaultRegistry *Registry = NewRegistry() // NewRegistry is used to create new bindings. func NewRegistry() *Registry { diff --git a/pkg/components/category.go b/pkg/components/category.go new file mode 100644 index 00000000000..bb8c153a94b --- /dev/null +++ b/pkg/components/category.go @@ -0,0 +1,28 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package components + +type Category string + +// supported components category +const ( + CategoryBindings Category = "bindings" + CategoryPubSub Category = "pubsub" + CategorySecretStore Category = "secretstores" + CategoryStateStore Category = "state" + CategoryMiddleware Category = "middleware" + CategoryConfiguration Category = "configuration" + CategoryLock Category = "lock" + CategoryNameResolution Category = "nameresolution" +) diff --git a/pkg/components/pluggable.go b/pkg/components/pluggable.go index 460c9799c25..b211883cd84 100644 --- a/pkg/components/pluggable.go +++ b/pkg/components/pluggable.go @@ -41,6 +41,18 @@ var WellKnownTypes = [9]PluggableType{ NameResolution, } +var pluggableToCategory = map[PluggableType]Category{ + State: CategoryStateStore, + PubSub: CategoryPubSub, + InputBinding: CategoryBindings, + OutputBinding: CategoryBindings, + HTTPMiddleware: CategoryMiddleware, + Configuration: CategoryConfiguration, + Secret: CategorySecretStore, + Lock: CategoryLock, + NameResolution: CategoryNameResolution, +} + // Pluggable represents a pluggable component specification. type Pluggable struct { // Name is the pluggable component name. @@ -50,3 +62,8 @@ type Pluggable struct { // Version is the pluggable component version. Version string } + +// Category returns the component category based on its pluggable type. +func (p Pluggable) Category() Category { + return pluggableToCategory[p.Type] +} diff --git a/pkg/components/pluggable/grpc.go b/pkg/components/pluggable/grpc.go index 936ba673024..d9e56e8605d 100644 --- a/pkg/components/pluggable/grpc.go +++ b/pkg/components/pluggable/grpc.go @@ -59,7 +59,7 @@ func GetSocketFolderPath() string { // socketFactoryFor returns a socket factory that returns the socket that will be used for the given pluggable component. func socketFactoryFor(pc components.Pluggable) func(string) string { - socketPrefix := fmt.Sprintf("%s/dapr-%s.%s-%s", GetSocketFolderPath(), pc.Type, pc.Name, pc.Version) + socketPrefix := fmt.Sprintf("%s/dapr-%s.%s-%s", GetSocketFolderPath(), pc.Category(), pc.Name, pc.Version) return func(componentName string) string { return fmt.Sprintf("%s-%s.sock", socketPrefix, componentName) } diff --git a/pkg/components/pluggable/grpc_test.go b/pkg/components/pluggable/grpc_test.go index 66bb2f07158..75b0b1b4f30 100644 --- a/pkg/components/pluggable/grpc_test.go +++ b/pkg/components/pluggable/grpc_test.go @@ -49,7 +49,7 @@ func TestGRPCConnector(t *testing.T) { } const ( fakeName = "name" - fakeType = "type" + fakeType = "state" fakeVersion = "v1" fakeComponentName = "component" ) diff --git a/pkg/components/pluggable/loader.go b/pkg/components/pluggable/loader.go index 2a7c7c0e374..9b361160fc1 100644 --- a/pkg/components/pluggable/loader.go +++ b/pkg/components/pluggable/loader.go @@ -29,8 +29,12 @@ import ( // toPluggable converts the pluggable component manifest to a pluggable component businessmodel struct. func toPluggable(comp componentsV1alpha1.PluggableComponent) components.Pluggable { + name := comp.GetObjectMeta().GetName() + if len(comp.Spec.ComponentName) != 0 { + name = comp.Spec.ComponentName + } return components.Pluggable{ - Name: comp.GetObjectMeta().GetName(), + Name: name, Type: components.PluggableType(comp.Spec.Type), Version: comp.Spec.Version, } diff --git a/pkg/proto/components/v1/bindings.pb.go b/pkg/proto/components/v1/bindings.pb.go new file mode 100644 index 00000000000..5be33ab0a83 --- /dev/null +++ b/pkg/proto/components/v1/bindings.pb.go @@ -0,0 +1,982 @@ +// +//Copyright 2022 The Dapr Authors +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +//http://www.apache.org/licenses/LICENSE-2.0 +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.21.1 +// source: dapr/proto/components/v1/bindings.proto + +package components + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// reserved for future-proof extensibility +type ListOperationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListOperationsRequest) Reset() { + *x = ListOperationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsRequest) ProtoMessage() {} + +func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead. +func (*ListOperationsRequest) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{0} +} + +type ListOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the list of all supported component operations. + Operations []string `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *ListOperationsResponse) Reset() { + *x = ListOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsResponse) ProtoMessage() {} + +func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead. +func (*ListOperationsResponse) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{1} +} + +func (x *ListOperationsResponse) GetOperations() []string { + if x != nil { + return x.Operations + } + return nil +} + +// InputBindingInitRequest is the request for initializing the input binding +// component. +type InputBindingInitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The metadata request. + Metadata *MetadataRequest `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *InputBindingInitRequest) Reset() { + *x = InputBindingInitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InputBindingInitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBindingInitRequest) ProtoMessage() {} + +func (x *InputBindingInitRequest) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBindingInitRequest.ProtoReflect.Descriptor instead. +func (*InputBindingInitRequest) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{2} +} + +func (x *InputBindingInitRequest) GetMetadata() *MetadataRequest { + if x != nil { + return x.Metadata + } + return nil +} + +// reserved for future-proof extensibility +type InputBindingInitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InputBindingInitResponse) Reset() { + *x = InputBindingInitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InputBindingInitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBindingInitResponse) ProtoMessage() {} + +func (x *InputBindingInitResponse) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBindingInitResponse.ProtoReflect.Descriptor instead. +func (*InputBindingInitResponse) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{3} +} + +// OutputBindingInitRequest is the request for initializing the output binding +// component. +type OutputBindingInitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The metadata request. + Metadata *MetadataRequest `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *OutputBindingInitRequest) Reset() { + *x = OutputBindingInitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputBindingInitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputBindingInitRequest) ProtoMessage() {} + +func (x *OutputBindingInitRequest) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputBindingInitRequest.ProtoReflect.Descriptor instead. +func (*OutputBindingInitRequest) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{4} +} + +func (x *OutputBindingInitRequest) GetMetadata() *MetadataRequest { + if x != nil { + return x.Metadata + } + return nil +} + +// reserved for future-proof extensibility +type OutputBindingInitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OutputBindingInitResponse) Reset() { + *x = OutputBindingInitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputBindingInitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputBindingInitResponse) ProtoMessage() {} + +func (x *OutputBindingInitResponse) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputBindingInitResponse.ProtoReflect.Descriptor instead. +func (*OutputBindingInitResponse) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{5} +} + +// Used for describing errors when ack'ing messages. +type AckResponseError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *AckResponseError) Reset() { + *x = AckResponseError{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AckResponseError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AckResponseError) ProtoMessage() {} + +func (x *AckResponseError) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AckResponseError.ProtoReflect.Descriptor instead. +func (*AckResponseError) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{6} +} + +func (x *AckResponseError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type ReadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The handle response. + ResponseData []byte `protobuf:"bytes,1,opt,name=response_data,json=responseData,proto3" json:"response_data,omitempty"` + // The unique message ID. + MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + // Optional, should not be fulfilled when the message was successfully + // handled. + ResponseError *AckResponseError `protobuf:"bytes,3,opt,name=response_error,json=responseError,proto3" json:"response_error,omitempty"` +} + +func (x *ReadRequest) Reset() { + *x = ReadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadRequest) ProtoMessage() {} + +func (x *ReadRequest) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead. +func (*ReadRequest) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{7} +} + +func (x *ReadRequest) GetResponseData() []byte { + if x != nil { + return x.ResponseData + } + return nil +} + +func (x *ReadRequest) GetMessageId() string { + if x != nil { + return x.MessageId + } + return "" +} + +func (x *ReadRequest) GetResponseError() *AckResponseError { + if x != nil { + return x.ResponseError + } + return nil +} + +type ReadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Read binding Data. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // The message metadata + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The message content type. + ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // The {transient} message ID used for ACK-ing it later. + MessageId string `protobuf:"bytes,4,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` +} + +func (x *ReadResponse) Reset() { + *x = ReadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadResponse) ProtoMessage() {} + +func (x *ReadResponse) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead. +func (*ReadResponse) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{8} +} + +func (x *ReadResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *ReadResponse) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ReadResponse) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *ReadResponse) GetMessageId() string { + if x != nil { + return x.MessageId + } + return "" +} + +// Used for invoking systems with optional payload. +type InvokeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The invoke payload. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // The invoke metadata. + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The system supported operation. + Operation string `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"` +} + +func (x *InvokeRequest) Reset() { + *x = InvokeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeRequest) ProtoMessage() {} + +func (x *InvokeRequest) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokeRequest.ProtoReflect.Descriptor instead. +func (*InvokeRequest) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{9} +} + +func (x *InvokeRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *InvokeRequest) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *InvokeRequest) GetOperation() string { + if x != nil { + return x.Operation + } + return "" +} + +// Response from the invoked system. +type InvokeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The response payload. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // The response metadata. + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The response content-type. + ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` +} + +func (x *InvokeResponse) Reset() { + *x = InvokeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeResponse) ProtoMessage() {} + +func (x *InvokeResponse) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_components_v1_bindings_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokeResponse.ProtoReflect.Descriptor instead. +func (*InvokeResponse) Descriptor() ([]byte, []int) { + return file_dapr_proto_components_v1_bindings_proto_rawDescGZIP(), []int{10} +} + +func (x *InvokeResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *InvokeResponse) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *InvokeResponse) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +var File_dapr_proto_components_v1_bindings_proto protoreflect.FileDescriptor + +var file_dapr_proto_components_v1_bindings_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x1a, 0x25, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x38, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x60, 0x0a, + 0x17, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x1a, 0x0a, 0x18, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x0a, 0x18, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1b, + 0x0a, 0x19, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x41, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x0b, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, + 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, + 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0xf3, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3b, 0x0a, + 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x49, + 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x52, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xb5, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x31, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, + 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x28, 0x01, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xb1, 0x03, + 0x0a, 0x0d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, + 0x71, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x27, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, + 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x64, 0x61, 0x70, 0x72, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_dapr_proto_components_v1_bindings_proto_rawDescOnce sync.Once + file_dapr_proto_components_v1_bindings_proto_rawDescData = file_dapr_proto_components_v1_bindings_proto_rawDesc +) + +func file_dapr_proto_components_v1_bindings_proto_rawDescGZIP() []byte { + file_dapr_proto_components_v1_bindings_proto_rawDescOnce.Do(func() { + file_dapr_proto_components_v1_bindings_proto_rawDescData = protoimpl.X.CompressGZIP(file_dapr_proto_components_v1_bindings_proto_rawDescData) + }) + return file_dapr_proto_components_v1_bindings_proto_rawDescData +} + +var file_dapr_proto_components_v1_bindings_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_dapr_proto_components_v1_bindings_proto_goTypes = []interface{}{ + (*ListOperationsRequest)(nil), // 0: dapr.proto.components.v1.ListOperationsRequest + (*ListOperationsResponse)(nil), // 1: dapr.proto.components.v1.ListOperationsResponse + (*InputBindingInitRequest)(nil), // 2: dapr.proto.components.v1.InputBindingInitRequest + (*InputBindingInitResponse)(nil), // 3: dapr.proto.components.v1.InputBindingInitResponse + (*OutputBindingInitRequest)(nil), // 4: dapr.proto.components.v1.OutputBindingInitRequest + (*OutputBindingInitResponse)(nil), // 5: dapr.proto.components.v1.OutputBindingInitResponse + (*AckResponseError)(nil), // 6: dapr.proto.components.v1.AckResponseError + (*ReadRequest)(nil), // 7: dapr.proto.components.v1.ReadRequest + (*ReadResponse)(nil), // 8: dapr.proto.components.v1.ReadResponse + (*InvokeRequest)(nil), // 9: dapr.proto.components.v1.InvokeRequest + (*InvokeResponse)(nil), // 10: dapr.proto.components.v1.InvokeResponse + nil, // 11: dapr.proto.components.v1.ReadResponse.MetadataEntry + nil, // 12: dapr.proto.components.v1.InvokeRequest.MetadataEntry + nil, // 13: dapr.proto.components.v1.InvokeResponse.MetadataEntry + (*MetadataRequest)(nil), // 14: dapr.proto.components.v1.MetadataRequest + (*PingRequest)(nil), // 15: dapr.proto.components.v1.PingRequest + (*PingResponse)(nil), // 16: dapr.proto.components.v1.PingResponse +} +var file_dapr_proto_components_v1_bindings_proto_depIdxs = []int32{ + 14, // 0: dapr.proto.components.v1.InputBindingInitRequest.metadata:type_name -> dapr.proto.components.v1.MetadataRequest + 14, // 1: dapr.proto.components.v1.OutputBindingInitRequest.metadata:type_name -> dapr.proto.components.v1.MetadataRequest + 6, // 2: dapr.proto.components.v1.ReadRequest.response_error:type_name -> dapr.proto.components.v1.AckResponseError + 11, // 3: dapr.proto.components.v1.ReadResponse.metadata:type_name -> dapr.proto.components.v1.ReadResponse.MetadataEntry + 12, // 4: dapr.proto.components.v1.InvokeRequest.metadata:type_name -> dapr.proto.components.v1.InvokeRequest.MetadataEntry + 13, // 5: dapr.proto.components.v1.InvokeResponse.metadata:type_name -> dapr.proto.components.v1.InvokeResponse.MetadataEntry + 2, // 6: dapr.proto.components.v1.InputBinding.Init:input_type -> dapr.proto.components.v1.InputBindingInitRequest + 7, // 7: dapr.proto.components.v1.InputBinding.Read:input_type -> dapr.proto.components.v1.ReadRequest + 15, // 8: dapr.proto.components.v1.InputBinding.Ping:input_type -> dapr.proto.components.v1.PingRequest + 4, // 9: dapr.proto.components.v1.OutputBinding.Init:input_type -> dapr.proto.components.v1.OutputBindingInitRequest + 9, // 10: dapr.proto.components.v1.OutputBinding.Invoke:input_type -> dapr.proto.components.v1.InvokeRequest + 0, // 11: dapr.proto.components.v1.OutputBinding.ListOperations:input_type -> dapr.proto.components.v1.ListOperationsRequest + 15, // 12: dapr.proto.components.v1.OutputBinding.Ping:input_type -> dapr.proto.components.v1.PingRequest + 3, // 13: dapr.proto.components.v1.InputBinding.Init:output_type -> dapr.proto.components.v1.InputBindingInitResponse + 8, // 14: dapr.proto.components.v1.InputBinding.Read:output_type -> dapr.proto.components.v1.ReadResponse + 16, // 15: dapr.proto.components.v1.InputBinding.Ping:output_type -> dapr.proto.components.v1.PingResponse + 5, // 16: dapr.proto.components.v1.OutputBinding.Init:output_type -> dapr.proto.components.v1.OutputBindingInitResponse + 10, // 17: dapr.proto.components.v1.OutputBinding.Invoke:output_type -> dapr.proto.components.v1.InvokeResponse + 1, // 18: dapr.proto.components.v1.OutputBinding.ListOperations:output_type -> dapr.proto.components.v1.ListOperationsResponse + 16, // 19: dapr.proto.components.v1.OutputBinding.Ping:output_type -> dapr.proto.components.v1.PingResponse + 13, // [13:20] is the sub-list for method output_type + 6, // [6:13] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_dapr_proto_components_v1_bindings_proto_init() } +func file_dapr_proto_components_v1_bindings_proto_init() { + if File_dapr_proto_components_v1_bindings_proto != nil { + return + } + file_dapr_proto_components_v1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_dapr_proto_components_v1_bindings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOperationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOperationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InputBindingInitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InputBindingInitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputBindingInitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputBindingInitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AckResponseError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_components_v1_bindings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dapr_proto_components_v1_bindings_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_dapr_proto_components_v1_bindings_proto_goTypes, + DependencyIndexes: file_dapr_proto_components_v1_bindings_proto_depIdxs, + MessageInfos: file_dapr_proto_components_v1_bindings_proto_msgTypes, + }.Build() + File_dapr_proto_components_v1_bindings_proto = out.File + file_dapr_proto_components_v1_bindings_proto_rawDesc = nil + file_dapr_proto_components_v1_bindings_proto_goTypes = nil + file_dapr_proto_components_v1_bindings_proto_depIdxs = nil +} diff --git a/pkg/proto/components/v1/bindings_grpc.pb.go b/pkg/proto/components/v1/bindings_grpc.pb.go new file mode 100644 index 00000000000..ad87227ad55 --- /dev/null +++ b/pkg/proto/components/v1/bindings_grpc.pb.go @@ -0,0 +1,420 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.1 +// source: dapr/proto/components/v1/bindings.proto + +package components + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InputBindingClient is the client API for InputBinding service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InputBindingClient interface { + // Initializes the inputbinding component component with the given metadata. + Init(ctx context.Context, in *InputBindingInitRequest, opts ...grpc.CallOption) (*InputBindingInitResponse, error) + // Establishes a stream with the server, which sends messages down to the + // client. The client streams acknowledgements back to the server. The server + // will close the stream and return the status on any error. In case of closed + // connection, the client should re-establish the stream. + Read(ctx context.Context, opts ...grpc.CallOption) (InputBinding_ReadClient, error) + // Ping the InputBinding. Used for liveness porpuses. + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type inputBindingClient struct { + cc grpc.ClientConnInterface +} + +func NewInputBindingClient(cc grpc.ClientConnInterface) InputBindingClient { + return &inputBindingClient{cc} +} + +func (c *inputBindingClient) Init(ctx context.Context, in *InputBindingInitRequest, opts ...grpc.CallOption) (*InputBindingInitResponse, error) { + out := new(InputBindingInitResponse) + err := c.cc.Invoke(ctx, "/dapr.proto.components.v1.InputBinding/Init", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inputBindingClient) Read(ctx context.Context, opts ...grpc.CallOption) (InputBinding_ReadClient, error) { + stream, err := c.cc.NewStream(ctx, &InputBinding_ServiceDesc.Streams[0], "/dapr.proto.components.v1.InputBinding/Read", opts...) + if err != nil { + return nil, err + } + x := &inputBindingReadClient{stream} + return x, nil +} + +type InputBinding_ReadClient interface { + Send(*ReadRequest) error + Recv() (*ReadResponse, error) + grpc.ClientStream +} + +type inputBindingReadClient struct { + grpc.ClientStream +} + +func (x *inputBindingReadClient) Send(m *ReadRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *inputBindingReadClient) Recv() (*ReadResponse, error) { + m := new(ReadResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *inputBindingClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, "/dapr.proto.components.v1.InputBinding/Ping", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InputBindingServer is the server API for InputBinding service. +// All implementations should embed UnimplementedInputBindingServer +// for forward compatibility +type InputBindingServer interface { + // Initializes the inputbinding component component with the given metadata. + Init(context.Context, *InputBindingInitRequest) (*InputBindingInitResponse, error) + // Establishes a stream with the server, which sends messages down to the + // client. The client streams acknowledgements back to the server. The server + // will close the stream and return the status on any error. In case of closed + // connection, the client should re-establish the stream. + Read(InputBinding_ReadServer) error + // Ping the InputBinding. Used for liveness porpuses. + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedInputBindingServer should be embedded to have forward compatible implementations. +type UnimplementedInputBindingServer struct { +} + +func (UnimplementedInputBindingServer) Init(context.Context, *InputBindingInitRequest) (*InputBindingInitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Init not implemented") +} +func (UnimplementedInputBindingServer) Read(InputBinding_ReadServer) error { + return status.Errorf(codes.Unimplemented, "method Read not implemented") +} +func (UnimplementedInputBindingServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} + +// UnsafeInputBindingServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InputBindingServer will +// result in compilation errors. +type UnsafeInputBindingServer interface { + mustEmbedUnimplementedInputBindingServer() +} + +func RegisterInputBindingServer(s grpc.ServiceRegistrar, srv InputBindingServer) { + s.RegisterService(&InputBinding_ServiceDesc, srv) +} + +func _InputBinding_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InputBindingInitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InputBindingServer).Init(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dapr.proto.components.v1.InputBinding/Init", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InputBindingServer).Init(ctx, req.(*InputBindingInitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InputBinding_Read_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(InputBindingServer).Read(&inputBindingReadServer{stream}) +} + +type InputBinding_ReadServer interface { + Send(*ReadResponse) error + Recv() (*ReadRequest, error) + grpc.ServerStream +} + +type inputBindingReadServer struct { + grpc.ServerStream +} + +func (x *inputBindingReadServer) Send(m *ReadResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *inputBindingReadServer) Recv() (*ReadRequest, error) { + m := new(ReadRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _InputBinding_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InputBindingServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dapr.proto.components.v1.InputBinding/Ping", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InputBindingServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InputBinding_ServiceDesc is the grpc.ServiceDesc for InputBinding service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InputBinding_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "dapr.proto.components.v1.InputBinding", + HandlerType: (*InputBindingServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Init", + Handler: _InputBinding_Init_Handler, + }, + { + MethodName: "Ping", + Handler: _InputBinding_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Read", + Handler: _InputBinding_Read_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "dapr/proto/components/v1/bindings.proto", +} + +// OutputBindingClient is the client API for OutputBinding service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OutputBindingClient interface { + // Initializes the outputbinding component component with the given metadata. + Init(ctx context.Context, in *OutputBindingInitRequest, opts ...grpc.CallOption) (*OutputBindingInitResponse, error) + // Invoke remote systems with optional payloads. + Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) + // ListOperations list system supported operations. + ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) + // Ping the OutputBinding. Used for liveness porpuses. + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type outputBindingClient struct { + cc grpc.ClientConnInterface +} + +func NewOutputBindingClient(cc grpc.ClientConnInterface) OutputBindingClient { + return &outputBindingClient{cc} +} + +func (c *outputBindingClient) Init(ctx context.Context, in *OutputBindingInitRequest, opts ...grpc.CallOption) (*OutputBindingInitResponse, error) { + out := new(OutputBindingInitResponse) + err := c.cc.Invoke(ctx, "/dapr.proto.components.v1.OutputBinding/Init", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *outputBindingClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) { + out := new(InvokeResponse) + err := c.cc.Invoke(ctx, "/dapr.proto.components.v1.OutputBinding/Invoke", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *outputBindingClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { + out := new(ListOperationsResponse) + err := c.cc.Invoke(ctx, "/dapr.proto.components.v1.OutputBinding/ListOperations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *outputBindingClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, "/dapr.proto.components.v1.OutputBinding/Ping", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OutputBindingServer is the server API for OutputBinding service. +// All implementations should embed UnimplementedOutputBindingServer +// for forward compatibility +type OutputBindingServer interface { + // Initializes the outputbinding component component with the given metadata. + Init(context.Context, *OutputBindingInitRequest) (*OutputBindingInitResponse, error) + // Invoke remote systems with optional payloads. + Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error) + // ListOperations list system supported operations. + ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) + // Ping the OutputBinding. Used for liveness porpuses. + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedOutputBindingServer should be embedded to have forward compatible implementations. +type UnimplementedOutputBindingServer struct { +} + +func (UnimplementedOutputBindingServer) Init(context.Context, *OutputBindingInitRequest) (*OutputBindingInitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Init not implemented") +} +func (UnimplementedOutputBindingServer) Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented") +} +func (UnimplementedOutputBindingServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented") +} +func (UnimplementedOutputBindingServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} + +// UnsafeOutputBindingServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OutputBindingServer will +// result in compilation errors. +type UnsafeOutputBindingServer interface { + mustEmbedUnimplementedOutputBindingServer() +} + +func RegisterOutputBindingServer(s grpc.ServiceRegistrar, srv OutputBindingServer) { + s.RegisterService(&OutputBinding_ServiceDesc, srv) +} + +func _OutputBinding_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OutputBindingInitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OutputBindingServer).Init(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dapr.proto.components.v1.OutputBinding/Init", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OutputBindingServer).Init(ctx, req.(*OutputBindingInitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OutputBinding_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InvokeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OutputBindingServer).Invoke(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dapr.proto.components.v1.OutputBinding/Invoke", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OutputBindingServer).Invoke(ctx, req.(*InvokeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OutputBinding_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OutputBindingServer).ListOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dapr.proto.components.v1.OutputBinding/ListOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OutputBindingServer).ListOperations(ctx, req.(*ListOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OutputBinding_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OutputBindingServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dapr.proto.components.v1.OutputBinding/Ping", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OutputBindingServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OutputBinding_ServiceDesc is the grpc.ServiceDesc for OutputBinding service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OutputBinding_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "dapr.proto.components.v1.OutputBinding", + HandlerType: (*OutputBindingServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Init", + Handler: _OutputBinding_Init_Handler, + }, + { + MethodName: "Invoke", + Handler: _OutputBinding_Invoke_Handler, + }, + { + MethodName: "ListOperations", + Handler: _OutputBinding_ListOperations_Handler, + }, + { + MethodName: "Ping", + Handler: _OutputBinding_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "dapr/proto/components/v1/bindings.proto", +} diff --git a/pkg/proto/components/v1/state.pb.go b/pkg/proto/components/v1/state.pb.go index a44263dc8ac..b703c7c8ac0 100644 --- a/pkg/proto/components/v1/state.pb.go +++ b/pkg/proto/components/v1/state.pb.go @@ -479,6 +479,7 @@ type TransactionalStateOperation struct { // request is either delete or set. // // Types that are assignable to Request: + // // *TransactionalStateOperation_Delete // *TransactionalStateOperation_Set Request isTransactionalStateOperation_Request `protobuf_oneof:"request"` diff --git a/pkg/runtime/runtime.go b/pkg/runtime/runtime.go index db60e39c165..78aa4fcf600 100644 --- a/pkg/runtime/runtime.go +++ b/pkg/runtime/runtime.go @@ -110,30 +110,18 @@ const ( hotReloadingEnvVar = "DAPR_ENABLE_HOT_RELOADING" componentFormat = "%s (%s/%s)" -) - -type ComponentCategory string - -const ( - bindingsComponent ComponentCategory = "bindings" - pubsubComponent ComponentCategory = "pubsub" - secretStoreComponent ComponentCategory = "secretstores" - stateComponent ComponentCategory = "state" - middlewareComponent ComponentCategory = "middleware" - configurationComponent ComponentCategory = "configuration" - lockComponent ComponentCategory = "lock" defaultComponentInitTimeout = time.Second * 5 ) -var componentCategoriesNeedProcess = []ComponentCategory{ - bindingsComponent, - pubsubComponent, - secretStoreComponent, - stateComponent, - middlewareComponent, - configurationComponent, - lockComponent, +var componentCategoriesNeedProcess = []components.Category{ + components.CategoryBindings, + components.CategoryPubSub, + components.CategorySecretStore, + components.CategoryStateStore, + components.CategoryMiddleware, + components.CategoryConfiguration, + components.CategoryLock, } var log = logger.NewLogger("dapr.runtime") @@ -2231,7 +2219,7 @@ func (a *DaprRuntime) appendOrReplaceComponents(component componentsV1alpha1.Com } } -func (a *DaprRuntime) extractComponentCategory(component componentsV1alpha1.Component) ComponentCategory { +func (a *DaprRuntime) extractComponentCategory(component componentsV1alpha1.Component) components.Category { for _, category := range componentCategoriesNeedProcess { if strings.HasPrefix(component.Spec.Type, fmt.Sprintf("%s.", category)) { return category @@ -2321,19 +2309,19 @@ func (a *DaprRuntime) processComponentAndDependents(comp componentsV1alpha1.Comp return nil } -func (a *DaprRuntime) doProcessOneComponent(category ComponentCategory, comp componentsV1alpha1.Component) error { +func (a *DaprRuntime) doProcessOneComponent(category components.Category, comp componentsV1alpha1.Component) error { switch category { - case bindingsComponent: + case components.CategoryBindings: return a.initBinding(comp) - case pubsubComponent: + case components.CategoryPubSub: return a.initPubSub(comp) - case secretStoreComponent: + case components.CategorySecretStore: return a.initSecretStore(comp) - case stateComponent: + case components.CategoryStateStore: return a.initState(comp) - case configurationComponent: + case components.CategoryConfiguration: return a.initConfiguration(comp) - case lockComponent: + case components.CategoryLock: return a.initLock(comp) } return nil @@ -2344,7 +2332,7 @@ func (a *DaprRuntime) preprocessOneComponent(comp *componentsV1alpha1.Component) *comp, unreadySecretsStore = a.processComponentSecrets(*comp) if unreadySecretsStore != "" { return componentPreprocessRes{ - unreadyDependency: componentDependency(secretStoreComponent, unreadySecretsStore), + unreadyDependency: componentDependency(components.CategorySecretStore, unreadySecretsStore), } } return componentPreprocessRes{} @@ -2786,7 +2774,7 @@ func (a *DaprRuntime) establishSecurity(sentryAddress string) error { return nil } -func componentDependency(compCategory ComponentCategory, name string) string { +func componentDependency(compCategory components.Category, name string) string { return fmt.Sprintf("%s:%s", compCategory, name) } diff --git a/pkg/runtime/runtime_test.go b/pkg/runtime/runtime_test.go index 3188b519a0b..d9f7bebfd83 100644 --- a/pkg/runtime/runtime_test.go +++ b/pkg/runtime/runtime_test.go @@ -40,14 +40,15 @@ import ( "github.com/dapr/components-contrib/lock" "github.com/dapr/components-contrib/middleware" - httpMiddleware "github.com/dapr/dapr/pkg/middleware/http" + "github.com/dapr/dapr/pkg/components" bindingsLoader "github.com/dapr/dapr/pkg/components/bindings" configurationLoader "github.com/dapr/dapr/pkg/components/configuration" lockLoader "github.com/dapr/dapr/pkg/components/lock" httpMiddlewareLoader "github.com/dapr/dapr/pkg/components/middleware/http" pubsubLoader "github.com/dapr/dapr/pkg/components/pubsub" stateLoader "github.com/dapr/dapr/pkg/components/state" + httpMiddleware "github.com/dapr/dapr/pkg/middleware/http" "github.com/ghodss/yaml" "github.com/google/uuid" @@ -358,7 +359,7 @@ func TestDoProcessComponent(t *testing.T) { ) // act - err := rt.doProcessOneComponent(ComponentCategory("lock"), lockComponent) + err := rt.doProcessOneComponent(components.CategoryLock, lockComponent) // assert assert.Error(t, err, "expected an error") @@ -381,7 +382,7 @@ func TestDoProcessComponent(t *testing.T) { lockComponentV3.Spec.Version = "v3" // act - err := rt.doProcessOneComponent(ComponentCategory("lock"), lockComponentV3) + err := rt.doProcessOneComponent(components.CategoryLock, lockComponentV3) // assert assert.Error(t, err, "expected an error") @@ -411,7 +412,7 @@ func TestDoProcessComponent(t *testing.T) { }, } // act - err := rt.doProcessOneComponent(ComponentCategory("lock"), lockComponentWithWrongStrategy) + err := rt.doProcessOneComponent(components.CategoryLock, lockComponentWithWrongStrategy) // assert assert.Error(t, err) }) @@ -430,7 +431,7 @@ func TestDoProcessComponent(t *testing.T) { ) // act - err := rt.doProcessOneComponent(ComponentCategory("lock"), lockComponent) + err := rt.doProcessOneComponent(components.CategoryLock, lockComponent) // assert assert.Nil(t, err, "unexpected error") // get modified key @@ -459,7 +460,7 @@ func TestDoProcessComponent(t *testing.T) { mockPubSub.On("Init", expectedMetadata).Return(assert.AnError) // act - err := rt.doProcessOneComponent(ComponentCategory("pubsub"), pubsubComponent) + err := rt.doProcessOneComponent(components.CategoryPubSub, pubsubComponent) // assert assert.Error(t, err, "expected an error") @@ -468,7 +469,7 @@ func TestDoProcessComponent(t *testing.T) { t.Run("test invalid category component", func(t *testing.T) { // act - err := rt.doProcessOneComponent(ComponentCategory("invalid"), pubsubComponent) + err := rt.doProcessOneComponent(components.Category("invalid"), pubsubComponent) // assert assert.NoError(t, err, "no error expected") diff --git a/tests/apps/binding_input/app.go b/tests/apps/binding_input/app.go index a52654d1354..6a8ca416b39 100644 --- a/tests/apps/binding_input/app.go +++ b/tests/apps/binding_input/app.go @@ -15,8 +15,10 @@ package main import ( "encoding/json" + "fmt" "log" "net/http" + "os" "sync" "github.com/gorilla/mux" @@ -24,7 +26,26 @@ import ( "github.com/dapr/dapr/tests/apps/utils" ) -const appPort = 3000 +const ( + appPort = 3000 + DaprTestTopicEnvVar = "DAPR_TEST_TOPIC_NAME" + DaprTestCustomPathRouteEnvVar = "DAPR_TEST_CUSTOM_PATH_ROUTE" +) + +var ( + topicName = "test-topic" + topicCustomPath = "custom-path" +) + +func init() { + if envTopicName := os.Getenv(DaprTestTopicEnvVar); len(envTopicName) != 0 { + topicName = envTopicName + } + + if envCustomPath := os.Getenv(DaprTestCustomPathRouteEnvVar); len(envCustomPath) != 0 { + topicCustomPath = envCustomPath + } +} type messageBuffer struct { lock *sync.RWMutex @@ -178,8 +199,8 @@ func appRouter() *mux.Router { router.Use(utils.LoggerMiddleware) router.HandleFunc("/", indexHandler).Methods("GET") - router.HandleFunc("/test-topic", testTopicHandler).Methods("POST", "OPTIONS") - router.HandleFunc("/custom-path", testRoutedTopicHandler).Methods("POST", "OPTIONS") + router.HandleFunc(fmt.Sprintf("/%s", topicName), testTopicHandler).Methods("POST", "OPTIONS") + router.HandleFunc(fmt.Sprintf("/%s", topicCustomPath), testRoutedTopicHandler).Methods("POST", "OPTIONS") router.HandleFunc("/tests/get_received_topics", testHandler).Methods("POST") router.Use(mux.CORSMethodMiddleware(router)) diff --git a/tests/apps/binding_input_grpc/app.go b/tests/apps/binding_input_grpc/app.go index 8f0fa2ecc2a..1f4f34adfde 100644 --- a/tests/apps/binding_input_grpc/app.go +++ b/tests/apps/binding_input_grpc/app.go @@ -19,6 +19,7 @@ import ( "fmt" "log" "net" + "os" "sync" "google.golang.org/protobuf/types/known/anypb" @@ -31,9 +32,18 @@ import ( ) const ( - appPort = "3000" + appPort = "3000" + DaprTestGRPCTopicEnvVar = "DAPR_TEST_GRPC_TOPIC_NAME" ) +var topicName = "test-topic-grpc" + +func init() { + if envTopicName := os.Getenv(DaprTestGRPCTopicEnvVar); len(envTopicName) != 0 { + topicName = envTopicName + } +} + // server is our user app. type server struct{} @@ -173,7 +183,7 @@ func (s *server) ListInputBindings(ctx context.Context, in *emptypb.Empty) (*run log.Println("List Input Bindings called") return &runtimev1pb.ListInputBindingsResponse{ Bindings: []string{ - "test-topic-grpc", + topicName, }, }, nil } diff --git a/tests/apps/binding_output/app.go b/tests/apps/binding_output/app.go index b9017751eec..996e825884a 100644 --- a/tests/apps/binding_output/app.go +++ b/tests/apps/binding_output/app.go @@ -20,6 +20,7 @@ import ( "fmt" "log" "net/http" + "os" "github.com/gorilla/mux" "google.golang.org/protobuf/types/known/anypb" @@ -30,11 +31,33 @@ import ( ) const ( - appPort = 3000 - daprPort = 3500 + appPort = 3000 + daprPort = 3500 + DaprTestTopicEnvVar = "DAPR_TEST_TOPIC_NAME" + DaprTestGRPCTopicEnvVar = "DAPR_TEST_GRPC_TOPIC_NAME" + DaprTestInputBindingServiceEnVar = "DAPR_TEST_INPUT_BINDING_SVC" ) -var daprClient runtimev1pb.DaprClient +var ( + daprClient runtimev1pb.DaprClient + topicName = "test-topic" + topicNameGrpc = "test-topic-grpc" + inputbindingSvc = "bindinginputgrpc" +) + +func init() { + if envTopicName := os.Getenv(DaprTestTopicEnvVar); len(envTopicName) != 0 { + topicName = envTopicName + } + + if envGrpcTopic := os.Getenv(DaprTestGRPCTopicEnvVar); len(envGrpcTopic) != 0 { + topicNameGrpc = envGrpcTopic + } + + if envinputBinding := os.Getenv(DaprTestInputBindingServiceEnVar); len(envinputBinding) != 0 { + inputbindingSvc = envinputBinding + } +} type testCommandRequest struct { Messages []struct { @@ -66,7 +89,7 @@ func testHandler(w http.ResponseWriter, r *http.Request) { return } - url := fmt.Sprintf("http://localhost:%d/v1.0/bindings/test-topic", daprPort) + url := fmt.Sprintf("http://localhost:%d/v1.0/bindings/%s", daprPort, topicName) for _, message := range requestBody.Messages { body, err := json.Marshal(&message) @@ -110,7 +133,7 @@ func sendGRPC(w http.ResponseWriter, r *http.Request) { log.Printf("Sending message: %s", body) req := runtimev1pb.InvokeBindingRequest{ - Name: "test-topic-grpc", + Name: topicNameGrpc, Data: body, Operation: "create", } @@ -129,7 +152,7 @@ func getReceivedTopicsGRPC(w http.ResponseWriter, r *http.Request) { log.Printf("Entered getReceivedTopicsGRPC") req := runtimev1pb.InvokeServiceRequest{ - Id: "bindinginputgrpc", + Id: inputbindingSvc, Message: &commonv1pb.InvokeRequest{ Method: "GetReceivedTopics", Data: &anypb.Any{}, diff --git a/tests/apps/pluggable_kafka-bindings/app.go b/tests/apps/pluggable_kafka-bindings/app.go new file mode 100644 index 00000000000..dc9ec59c8c0 --- /dev/null +++ b/tests/apps/pluggable_kafka-bindings/app.go @@ -0,0 +1,27 @@ +/* +Copyright 2022 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + dapr "github.com/dapr-sandbox/components-go-sdk" + "github.com/dapr/components-contrib/bindings/kafka" + "github.com/dapr/kit/logger" +) + +var log = logger.NewLogger("kafka-bindings-pluggable") + +func main() { + kafka := kafka.NewKafka(log) + dapr.MustRun(dapr.UseInputBinding(kafka), dapr.UseOutputBinding(kafka)) +} diff --git a/tests/apps/pluggable_kafka-bindings/go.mod b/tests/apps/pluggable_kafka-bindings/go.mod new file mode 100644 index 00000000000..4cc54589f54 --- /dev/null +++ b/tests/apps/pluggable_kafka-bindings/go.mod @@ -0,0 +1,48 @@ +module github.com/dapr/dapr/tests/apps/kafka-bindings + +go 1.19 + +replace github.com/dapr/dapr => ../../../ + +require ( + github.com/dapr-sandbox/components-go-sdk v0.0.0-20220920190551-b946003416f0 + github.com/dapr/components-contrib v1.8.0-rc.1.0.20220901165827-19341e5a0ff4 + github.com/dapr/kit v0.0.2 +) + +require ( + github.com/Shopify/sarama v1.30.0 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/dapr/dapr v1.8.4-0.20220919205204-a52441615dc9 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/eapache/go-resiliency v1.2.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/klauspost/compress v1.15.1 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect + github.com/pierrec/lz4 v2.6.1+incompatible // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/scram v1.0.2 // indirect + github.com/xdg-go/stringprep v1.0.2 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/net v0.0.0-20220630215102-69896b714898 // indirect + golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f // indirect + google.golang.org/grpc v1.47.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect +) diff --git a/tests/apps/pluggable_kafka-bindings/go.sum b/tests/apps/pluggable_kafka-bindings/go.sum new file mode 100644 index 00000000000..d0e66a8906a --- /dev/null +++ b/tests/apps/pluggable_kafka-bindings/go.sum @@ -0,0 +1,506 @@ +cloud.google.com/go v0.26.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.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Shopify/sarama v1.30.0 h1:TOZL6r37xJBDEMLx4yjB77jxbZYXPaDow08TSK6vIL0= +github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= +github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae h1:ePgznFqEG1v3AjMklnK8H7BSc++FDSo7xfK9K7Af+0Y= +github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/dapr-sandbox/components-go-sdk v0.0.0-20220920190551-b946003416f0 h1:WhRw75vBv7GaknOgzx8IhSWMbWo1QN9fh+xFSyAUtHY= +github.com/dapr-sandbox/components-go-sdk v0.0.0-20220920190551-b946003416f0/go.mod h1:L7TR2kKFl6zMTv6z9a2FguwOj0cQHrTgGom2E/5Mb+4= +github.com/dapr/components-contrib v1.8.0-rc.1.0.20220901165827-19341e5a0ff4 h1:dtp6v5a9viHQSQfrfSaumAoSBMAbsqPrHdoHIxcPAJ4= +github.com/dapr/components-contrib v1.8.0-rc.1.0.20220901165827-19341e5a0ff4/go.mod h1:zllmwB5vkb108A+XU9437LhH48/OICqYcN4r+FQum2k= +github.com/dapr/kit v0.0.2 h1:VNg6RWrBMOdtY0/ZLztyAa/RjyFLaskdO9wt2HIREwk= +github.com/dapr/kit v0.0.2/go.mod h1:Q4TWm9+vcPZFGehaJUZt2hvA805wJm7FIuoArytWJ8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +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/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= +github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= +github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +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-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220630215102-69896b714898 h1:K7wO6V1IrczY9QOQ2WkVpw4JQSwCd52UsxVEirZUfiw= +golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +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.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f h1:kYlCnpX4eB0QEnXm12j4DAX4yrjjhJmsyuWtSSZ+Buo= +google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +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= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +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.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/tests/config/dapr_kafka_pluggable_bindings.yaml b/tests/config/dapr_kafka_pluggable_bindings.yaml new file mode 100644 index 00000000000..58fd8ac2a38 --- /dev/null +++ b/tests/config/dapr_kafka_pluggable_bindings.yaml @@ -0,0 +1,117 @@ +# +# Copyright 2022 The Dapr Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +apiVersion: dapr.io/v1alpha1 +kind: PluggableComponent +metadata: + name: kafka-output +spec: + componentName: kafka-pluggable + type: outputbinding + version: v1 +--- +apiVersion: dapr.io/v1alpha1 +kind: PluggableComponent +metadata: + name: kafka-input +spec: + componentName: kafka-pluggable + type: inputbinding + version: v1 +--- +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: pluggable-test-topic +spec: + type: bindings.kafka-pluggable + initTimeout: 1m + version: v1 + metadata: + # Kafka broker connection setting + - name: brokers + value: dapr-kafka:9092 + # consumer configuration: topic and consumer group + - name: topics + value: dapr-test-pluggable + - name: consumerGroup + value: group1-pluggable + # publisher configuration: topic + - name: publishTopic + value: dapr-test-pluggable + - name: authRequired + value: "false" + - name: initialOffset + value: oldest +scopes: + - pluggable-bindinginput + - pluggable-bindingoutput +--- +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: pluggable-test-topic-grpc +spec: + type: bindings.kafka-pluggable + initTimeout: 1m + version: v1 + metadata: + # Kafka broker connection setting + - name: brokers + value: dapr-kafka:9092 + # consumer configuration: topic and consumer group + - name: topics + value: dapr-test-grpc-pluggable + - name: consumerGroup + value: group1-pluggable + # publisher configuration: topic + - name: publishTopic + value: dapr-test-grpc-pluggable + - name: authRequired + value: "false" + - name: initialOffset + value: oldest +scopes: + - pluggable-bindinginputgrpc + - pluggable-bindingoutput + +--- +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: test-topic-custom-route-pluggable +spec: + type: bindings.kafka-pluggable + initTimeout: 1m + version: v1 + metadata: + # Kafka broker connection setting + - name: brokers + value: dapr-kafka:9092 + # consumer configuration: topic and consumer group + - name: topics + value: dapr-test-pluggable + - name: consumerGroup + value: group2-pluggable + # publisher configuration: topic + - name: publishTopic + value: dapr-test-pluggable + - name: authRequired + value: "false" + # set specify route + - name: route + value: /pluggable-custom-path + - name: initialOffset + value: oldest +scopes: + - pluggable-bindinginput diff --git a/tests/dapr_tests.mk b/tests/dapr_tests.mk index 1d60a24da67..06b43de2999 100644 --- a/tests/dapr_tests.mk +++ b/tests/dapr_tests.mk @@ -49,6 +49,7 @@ injectorapp-init \ metadata \ pluggable_redis-statestore \ pluggable_redis-pubsub \ +pluggable_kafka-bindings \ # PERFORMANCE test app list PERF_TEST_APPS=actorfeatures actorjava tester service_invocation_http service_invocation_grpc @@ -435,6 +436,7 @@ setup-test-components: setup-app-configurations $(KUBECTL) apply -f ./tests/config/dapr_$(DAPR_TEST_PUBSUB)_pubsub.yaml --namespace $(DAPR_TEST_NAMESPACE) $(KUBECTL) apply -f ./tests/config/dapr_redis_pluggable_pubsub.yaml --namespace $(DAPR_TEST_NAMESPACE) $(KUBECTL) apply -f ./tests/config/pubsub_no_resiliency.yaml --namespace $(DAPR_TEST_NAMESPACE) + $(KUBECTL) apply -f ./tests/config/dapr_kafka_pluggable_bindings.yaml --namespace $(DAPR_TEST_NAMESPACE) $(KUBECTL) apply -f ./tests/config/dapr_kafka_bindings.yaml --namespace $(DAPR_TEST_NAMESPACE) $(KUBECTL) apply -f ./tests/config/dapr_kafka_bindings_custom_route.yaml --namespace $(DAPR_TEST_NAMESPACE) $(KUBECTL) apply -f ./tests/config/dapr_kafka_bindings_grpc.yaml --namespace $(DAPR_TEST_NAMESPACE) diff --git a/tests/e2e/bindings/bindings_test.go b/tests/e2e/bindings/bindings_test.go index 0f8a507ad33..bce2ce229f4 100644 --- a/tests/e2e/bindings/bindings_test.go +++ b/tests/e2e/bindings/bindings_test.go @@ -29,6 +29,7 @@ import ( "github.com/dapr/dapr/tests/runner" "github.com/stretchr/testify/require" + apiv1 "k8s.io/api/core/v1" ) type testSendRequest struct { @@ -63,11 +64,45 @@ const ( // Number of times to call the endpoint to check for health. numHealthChecks = 60 // Number of seconds to wait for binding travelling throughout the cluster. - bindingPropagationDelay = 10 + inputBindingAppName = "bindinginput" + outputBindingAppName = "bindingoutput" + inputBindingGRPCAppName = "bindinginputgrpc" + e2eInputBindingImage = "e2e-binding_input" + e2eOutputBindingImage = "e2e-binding_output" + e2eInputBindingGRPCImage = "e2e-binding_input_grpc" + inputBindingPluggableAppName = "pluggable-bindinginput" + outputbindingPluggableAppName = "pluggable-bindingoutput" + inputBindingGRPCPluggableAppName = "pluggable-bindinginputgrpc" + pluggableComponentsAppConfig = "pluggablecomponentsconfig" + kafkaBindingsPluggableComponentImage = "e2e-pluggable_kafka-bindings" + DaprTestTopicEnvVar = "DAPR_TEST_TOPIC_NAME" + DaprTestGRPCTopicEnvVar = "DAPR_TEST_GRPC_TOPIC_NAME" + DaprTestInputBindingServiceEnVar = "DAPR_TEST_INPUT_BINDING_SVC" + DaprTestCustomPathRouteEnvVar = "DAPR_TEST_CUSTOM_PATH_ROUTE" + bindingPropagationDelay = 10 ) var tr *runner.TestRunner +var bindingsApps []struct { + suite string + inputApp string + inputGRPCApp string + outputApp string +} = []struct { + suite string + inputApp string + inputGRPCApp string + outputApp string +}{ + { + suite: "built-in", + inputApp: inputBindingAppName, + inputGRPCApp: inputBindingGRPCAppName, + outputApp: outputBindingAppName, + }, +} + func TestMain(m *testing.M) { utils.SetupLogs("bindings") utils.InitHTTPClient(true) @@ -76,25 +111,25 @@ func TestMain(m *testing.M) { // and will be cleaned up after all tests are finished automatically testApps := []kube.AppDescription{ { - AppName: "bindinginput", + AppName: inputBindingAppName, DaprEnabled: true, - ImageName: "e2e-binding_input", + ImageName: e2eInputBindingImage, Replicas: 1, IngressEnabled: true, MetricsEnabled: true, }, { - AppName: "bindingoutput", + AppName: outputBindingAppName, DaprEnabled: true, - ImageName: "e2e-binding_output", + ImageName: e2eOutputBindingImage, Replicas: 1, IngressEnabled: true, MetricsEnabled: true, }, { - AppName: "bindinginputgrpc", + AppName: inputBindingGRPCAppName, DaprEnabled: true, - ImageName: "e2e-binding_input_grpc", + ImageName: e2eInputBindingGRPCImage, Replicas: 1, IngressEnabled: true, MetricsEnabled: true, @@ -102,71 +137,159 @@ func TestMain(m *testing.M) { }, } + if utils.TestTargetOS() != "windows" { // pluggable components feature requires unix socket to work + const ( + pluggableTestTopicSocket = "dapr-bindings.kafka-pluggable-v1-pluggable-test-topic.sock" + pluggableTestGRPCTopicSocket = "dapr-bindings.kafka-pluggable-v1-pluggable-test-topic-grpc.sock" + pluggableTestCustomRouteTopicSocket = "dapr-bindings.kafka-pluggable-v1-test-topic-custom-route-pluggable.sock" + ) + kafkaComponentWithName := func(name string) apiv1.Container { + return apiv1.Container{ + Name: name, + Image: runner.BuildTestImageName(kafkaBindingsPluggableComponentImage), + } + } + appEnv := map[string]string{ + DaprTestGRPCTopicEnvVar: "pluggable-test-topic-grpc", + DaprTestTopicEnvVar: "pluggable-test-topic", + DaprTestInputBindingServiceEnVar: "pluggable-bindinginputgrpc", + DaprTestCustomPathRouteEnvVar: "pluggable-custom-path", + } + testApps = append(testApps, []kube.AppDescription{ + { + AppName: inputBindingPluggableAppName, + DaprEnabled: true, + ImageName: e2eInputBindingImage, + Replicas: 1, + IngressEnabled: true, + MetricsEnabled: true, + Config: pluggableComponentsAppConfig, + PluggableComponents: map[string]apiv1.Container{ + pluggableTestTopicSocket: kafkaComponentWithName("kafka-pluggable"), + pluggableTestCustomRouteTopicSocket: kafkaComponentWithName("kafka-pluggable-custom-route"), + }, + AppEnv: appEnv, + }, + { + AppName: outputbindingPluggableAppName, + DaprEnabled: true, + ImageName: e2eOutputBindingImage, + Replicas: 1, + IngressEnabled: true, + MetricsEnabled: true, + Config: pluggableComponentsAppConfig, + PluggableComponents: map[string]apiv1.Container{ + pluggableTestTopicSocket: kafkaComponentWithName("kafka-pluggable"), + pluggableTestGRPCTopicSocket: kafkaComponentWithName("kafka-pluggable-grpc"), + }, + AppEnv: appEnv, + }, + { + AppName: inputBindingGRPCPluggableAppName, + DaprEnabled: true, + ImageName: e2eInputBindingGRPCImage, + Replicas: 1, + IngressEnabled: true, + MetricsEnabled: true, + Config: pluggableComponentsAppConfig, + AppProtocol: "grpc", + PluggableComponents: map[string]apiv1.Container{ + pluggableTestGRPCTopicSocket: kafkaComponentWithName("kafka-pluggable"), + }, + AppEnv: appEnv, + }, + }...) + bindingsApps = append(bindingsApps, struct { + suite string + inputApp string + inputGRPCApp string + outputApp string + }{ + suite: "pluggable", + inputApp: inputBindingPluggableAppName, + inputGRPCApp: inputBindingGRPCPluggableAppName, + outputApp: outputbindingPluggableAppName, + }) + } + tr = runner.NewTestRunner("bindings", testApps, nil, nil) os.Exit(tr.Start(m)) } -func TestBindings(t *testing.T) { - // setup - outputExternalURL := tr.Platform.AcquireAppExternalURL("bindingoutput") - require.NotEmpty(t, outputExternalURL, "bindingoutput external URL must not be empty!") - inputExternalURL := tr.Platform.AcquireAppExternalURL("bindinginput") - require.NotEmpty(t, inputExternalURL, "bindinginput external URL must not be empty!") - inputGRPCExternalURL := tr.Platform.AcquireAppExternalURL("bindinginputgrpc") - require.NotEmpty(t, inputGRPCExternalURL, "bindinginput external URL must not be empty!") - // This initial probe makes the test wait a little bit longer when needed, - // making this test less flaky due to delays in the deployment. - _, err := utils.HTTPGetNTimes(outputExternalURL, numHealthChecks) - require.NoError(t, err) - _, err = utils.HTTPGetNTimes(inputExternalURL, numHealthChecks) - require.NoError(t, err) +func testBindingsForApp(app struct { + suite string + inputApp string + inputGRPCApp string + outputApp string +}) func(t *testing.T) { + return func(t *testing.T) { + // setup + outputExternalURL := tr.Platform.AcquireAppExternalURL(app.outputApp) + require.NotEmpty(t, outputExternalURL, "bindingoutput external URL must not be empty!") + inputExternalURL := tr.Platform.AcquireAppExternalURL(app.inputApp) + require.NotEmpty(t, inputExternalURL, "bindinginput external URL must not be empty!") + inputGRPCExternalURL := tr.Platform.AcquireAppExternalURL(app.inputGRPCApp) + require.NotEmpty(t, inputGRPCExternalURL, "bindinginput external URL must not be empty!") + // This initial probe makes the test wait a little bit longer when needed, + // making this test less flaky due to delays in the deployment. + _, err := utils.HTTPGetNTimes(outputExternalURL, numHealthChecks) + require.NoError(t, err) + _, err = utils.HTTPGetNTimes(inputExternalURL, numHealthChecks) + require.NoError(t, err) - var req testSendRequest - for _, mes := range testMessages { - req.Messages = append(req.Messages, messageData{Data: mes, Operation: "create"}) - } - body, err := json.Marshal(req) - require.NoError(t, err) + var req testSendRequest + for _, mes := range testMessages { + req.Messages = append(req.Messages, messageData{Data: mes, Operation: "create"}) + } + body, err := json.Marshal(req) + require.NoError(t, err) - // act for http - httpPostWithAssert(t, fmt.Sprintf("%s/tests/send", outputExternalURL), body, http.StatusOK) + // act for http + httpPostWithAssert(t, fmt.Sprintf("%s/tests/send", outputExternalURL), body, http.StatusOK) - // This delay allows all the messages to reach corresponding input bindings. - time.Sleep(bindingPropagationDelay * time.Second) + // This delay allows all the messages to reach corresponding input bindings. + time.Sleep(bindingPropagationDelay * time.Second) - // assert for HTTP - resp := httpPostWithAssert(t, fmt.Sprintf("%s/tests/get_received_topics", inputExternalURL), nil, http.StatusOK) + // assert for HTTP + resp := httpPostWithAssert(t, fmt.Sprintf("%s/tests/get_received_topics", inputExternalURL), nil, http.StatusOK) - var decodedResponse receivedTopicsResponse - err = json.Unmarshal(resp, &decodedResponse) - require.NoError(t, err) + var decodedResponse receivedTopicsResponse + err = json.Unmarshal(resp, &decodedResponse) + require.NoError(t, err) - // Only the first message fails, all other messages are successfully consumed. - // nine messages succeed. - require.Equal(t, testMessages[1:], decodedResponse.ReceivedMessages) - // one message fails. - require.Equal(t, testMessages[0], decodedResponse.FailedMessage) - // routed binding will receive all messages - require.Equal(t, testMessages[0:], decodedResponse.RoutedMessages) + // Only the first message fails, all other messages are successfully consumed. + // nine messages succeed. + require.Equal(t, testMessages[1:], decodedResponse.ReceivedMessages) + // one message fails. + require.Equal(t, testMessages[0], decodedResponse.FailedMessage) + // routed binding will receive all messages + require.Equal(t, testMessages[0:], decodedResponse.RoutedMessages) - // act for gRPC - httpPostWithAssert(t, fmt.Sprintf("%s/tests/sendGRPC", outputExternalURL), body, http.StatusOK) + // act for gRPC + httpPostWithAssert(t, fmt.Sprintf("%s/tests/sendGRPC", outputExternalURL), body, http.StatusOK) - // This delay allows all the messages to reach corresponding input bindings. - time.Sleep(bindingPropagationDelay * time.Second) + // This delay allows all the messages to reach corresponding input bindings. + time.Sleep(bindingPropagationDelay * time.Second) - // assert for gRPC - resp = httpPostWithAssert(t, fmt.Sprintf("%s/tests/get_received_topics_grpc", outputExternalURL), nil, http.StatusOK) + // assert for gRPC + resp = httpPostWithAssert(t, fmt.Sprintf("%s/tests/get_received_topics_grpc", outputExternalURL), nil, http.StatusOK) - // assert for gRPC - err = json.Unmarshal(resp, &decodedResponse) - require.NoError(t, err) + // assert for gRPC + err = json.Unmarshal(resp, &decodedResponse) + require.NoError(t, err) - // Only the first message fails, all other messages are successfully consumed. - // nine messages succeed. - require.Equal(t, testMessages[1:], decodedResponse.ReceivedMessages) - // one message fails. - require.Equal(t, testMessages[0], decodedResponse.FailedMessage) + // Only the first message fails, all other messages are successfully consumed. + // nine messages succeed. + require.Equal(t, testMessages[1:], decodedResponse.ReceivedMessages) + // one message fails. + require.Equal(t, testMessages[0], decodedResponse.FailedMessage) + } +} +func TestBindings(t *testing.T) { + for idx := range bindingsApps { + app := bindingsApps[idx] + t.Run(app.suite, testBindingsForApp(app)) + } } func httpPostWithAssert(t *testing.T, url string, data []byte, status int) []byte { diff --git a/tools/codegen.mk b/tools/codegen.mk index 6afaf558d97..b51caff4209 100644 --- a/tools/codegen.mk +++ b/tools/codegen.mk @@ -1,4 +1,4 @@ -PROTOS = operator placement sentry common runtime internals +PROTOS = operator placement sentry common runtime internals components ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin