feature(apphealth&configuration): add app health check & adapt new configuration API (#323)

* fix/typo: modify state  annotation

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

Signed-off-by: 1046102779 <seachen@tencent.com>
This commit is contained in:
yellow chicks 2022-10-01 06:19:16 +08:00 committed by GitHub
parent c89770a473
commit f182441168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 2216 additions and 816 deletions

View File

@ -22,10 +22,10 @@ import (
anypb "github.com/golang/protobuf/ptypes/any" anypb "github.com/golang/protobuf/ptypes/any"
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
"github.com/dapr/go-sdk/actor" "github.com/dapr/go-sdk/actor"
"github.com/dapr/go-sdk/actor/codec" "github.com/dapr/go-sdk/actor/codec"
"github.com/dapr/go-sdk/actor/config" "github.com/dapr/go-sdk/actor/config"
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
type InvokeActorRequest struct { type InvokeActorRequest struct {

View File

@ -18,7 +18,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
// InvokeBindingRequest represents binding invocation request. // InvokeBindingRequest represents binding invocation request.

View File

@ -32,7 +32,7 @@ import (
"google.golang.org/grpc/metadata" "google.golang.org/grpc/metadata"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
// used to import codec implements. // used to import codec implements.
_ "github.com/dapr/go-sdk/actor/codec/impl" _ "github.com/dapr/go-sdk/actor/codec/impl"
@ -121,7 +121,7 @@ type Client interface {
GetConfigurationItem(ctx context.Context, storeName, key string, opts ...ConfigurationOpt) (*ConfigurationItem, error) GetConfigurationItem(ctx context.Context, storeName, key string, opts ...ConfigurationOpt) (*ConfigurationItem, error)
// GetConfigurationItems can get a list of configuration item by storeName and keys // GetConfigurationItems can get a list of configuration item by storeName and keys
GetConfigurationItems(ctx context.Context, storeName string, keys []string, opts ...ConfigurationOpt) ([]*ConfigurationItem, error) GetConfigurationItems(ctx context.Context, storeName string, keys []string, opts ...ConfigurationOpt) (map[string]*ConfigurationItem, error)
// SubscribeConfigurationItems can subscribe the change of configuration items by storeName and keys, and return subscription id // SubscribeConfigurationItems can subscribe the change of configuration items by storeName and keys, and return subscription id
SubscribeConfigurationItems(ctx context.Context, storeName string, keys []string, handler ConfigurationHandleFunction, opts ...ConfigurationOpt) error SubscribeConfigurationItems(ctx context.Context, storeName string, keys []string, handler ConfigurationHandleFunction, opts ...ConfigurationOpt) error

View File

@ -19,7 +19,6 @@ import (
"fmt" "fmt"
"net" "net"
"os" "os"
"strconv"
"sync" "sync"
"testing" "testing"
"time" "time"
@ -33,8 +32,8 @@ import (
"google.golang.org/grpc/test/bufconn" "google.golang.org/grpc/test/bufconn"
"google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/anypb"
commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1" commonv1pb "github.com/dapr/go-sdk/dapr/proto/common/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
const ( const (
@ -408,12 +407,11 @@ func (s *testDaprServer) GetConfigurationAlpha1(ctx context.Context, in *pb.GetC
if in.GetStoreName() == "" { if in.GetStoreName() == "" {
return &pb.GetConfigurationResponse{}, errors.New("store name notfound") return &pb.GetConfigurationResponse{}, errors.New("store name notfound")
} }
items := make([]*commonv1pb.ConfigurationItem, 0) items := make(map[string]*commonv1pb.ConfigurationItem)
for _, v := range in.GetKeys() { for _, v := range in.GetKeys() {
items = append(items, &commonv1pb.ConfigurationItem{ items[v] = &commonv1pb.ConfigurationItem{
Key: v,
Value: v + valueSuffix, Value: v + valueSuffix,
}) }
} }
return &pb.GetConfigurationResponse{ return &pb.GetConfigurationResponse{
Items: items, Items: items,
@ -432,13 +430,11 @@ func (s *testDaprServer) SubscribeConfigurationAlpha1(in *pb.SubscribeConfigurat
return nil return nil
default: default:
} }
items := make([]*commonv1pb.ConfigurationItem, 0) items := make(map[string]*commonv1pb.ConfigurationItem)
for _, v := range in.GetKeys() { for _, v := range in.GetKeys() {
items = append(items, &commonv1pb.ConfigurationItem{ items[v] = &commonv1pb.ConfigurationItem{
Key: v, Value: v + valueSuffix,
Value: v + "_" + strconv.Itoa(i), }
},
)
} }
if err := server.Send(&pb.SubscribeConfigurationResponse{ if err := server.Send(&pb.SubscribeConfigurationResponse{
Id: id.String(), Id: id.String(),

View File

@ -7,11 +7,10 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
type ConfigurationItem struct { type ConfigurationItem struct {
Key string
Value string Value string
Version string Version string
Metadata map[string]string Metadata map[string]string
@ -33,10 +32,11 @@ func (c *GRPCClient) GetConfigurationItem(ctx context.Context, storeName, key st
if len(items) == 0 { if len(items) == 0 {
return nil, nil return nil, nil
} }
return items[0], nil
return items[key], nil
} }
func (c *GRPCClient) GetConfigurationItems(ctx context.Context, storeName string, keys []string, opts ...ConfigurationOpt) ([]*ConfigurationItem, error) { func (c *GRPCClient) GetConfigurationItems(ctx context.Context, storeName string, keys []string, opts ...ConfigurationOpt) (map[string]*ConfigurationItem, error) {
metadata := make(map[string]string) metadata := make(map[string]string)
for _, opt := range opts { for _, opt := range opts {
opt(metadata) opt(metadata)
@ -50,19 +50,18 @@ func (c *GRPCClient) GetConfigurationItems(ctx context.Context, storeName string
return nil, err return nil, err
} }
configItems := make([]*ConfigurationItem, 0) configItems := make(map[string]*ConfigurationItem)
for _, v := range rsp.Items { for k, v := range rsp.Items {
configItems = append(configItems, &ConfigurationItem{ configItems[k] = &ConfigurationItem{
Key: v.Key,
Value: v.Value, Value: v.Value,
Version: v.Version, Version: v.Version,
Metadata: v.Metadata, Metadata: v.Metadata,
}) }
} }
return configItems, nil return configItems, nil
} }
type ConfigurationHandleFunction func(string, []*ConfigurationItem) type ConfigurationHandleFunction func(string, map[string]*ConfigurationItem)
func (c *GRPCClient) SubscribeConfigurationItems(ctx context.Context, storeName string, keys []string, handler ConfigurationHandleFunction, opts ...ConfigurationOpt) error { func (c *GRPCClient) SubscribeConfigurationItems(ctx context.Context, storeName string, keys []string, handler ConfigurationHandleFunction, opts ...ConfigurationOpt) error {
metadata := make(map[string]string) metadata := make(map[string]string)
@ -91,14 +90,13 @@ func (c *GRPCClient) SubscribeConfigurationItems(ctx context.Context, storeName
break break
} }
subscribeID = rsp.Id subscribeID = rsp.Id
configurationItems := make([]*ConfigurationItem, 0) configurationItems := make(map[string]*ConfigurationItem)
for _, v := range rsp.Items { for k, v := range rsp.Items {
configurationItems = append(configurationItems, &ConfigurationItem{ configurationItems[k] = &ConfigurationItem{
Key: v.Key,
Value: v.Value, Value: v.Value,
Version: v.Version, Version: v.Version,
Metadata: v.Metadata, Metadata: v.Metadata,
}) }
} }
handler(rsp.Id, configurationItems) handler(rsp.Id, configurationItems)
} }

View File

@ -2,7 +2,6 @@ package client
import ( import (
"context" "context"
"strconv"
"testing" "testing"
"time" "time"
@ -33,11 +32,12 @@ func TestGetConfigurationItem(t *testing.T) {
func TestGetConfigurationItems(t *testing.T) { func TestGetConfigurationItems(t *testing.T) {
ctx := context.Background() ctx := context.Background()
keys := []string{"mykey1", "mykey2", "mykey3"}
t.Run("Test get configuration items", func(t *testing.T) { t.Run("Test get configuration items", func(t *testing.T) {
resp, err := testClient.GetConfigurationItems(ctx, "example-config", []string{"mykey1", "mykey2", "mykey3"}) resp, err := testClient.GetConfigurationItems(ctx, "example-config", keys)
assert.Nil(t, err) assert.Nil(t, err)
for i, v := range resp { for _, k := range keys {
assert.Equal(t, "mykey"+strconv.Itoa(i+1)+valueSuffix, v.Value) assert.Equal(t, k+valueSuffix, resp[k].Value)
} }
}) })
} }
@ -47,12 +47,13 @@ func TestSubscribeConfigurationItems(t *testing.T) {
counter := 0 counter := 0
totalCounter := 0 totalCounter := 0
keys := []string{"mykey1", "mykey2", "mykey3"}
t.Run("Test subscribe configuration items", func(t *testing.T) { t.Run("Test subscribe configuration items", func(t *testing.T) {
err := testClient.SubscribeConfigurationItems(ctx, "example-config", err := testClient.SubscribeConfigurationItems(ctx, "example-config",
[]string{"mykey", "mykey2", "mykey3"}, func(s string, items []*ConfigurationItem) { keys, func(s string, items map[string]*ConfigurationItem) {
counter++ counter++
for _, v := range items { for _, k := range keys {
assert.Equal(t, v.Value, v.Key+"_"+strconv.Itoa(counter-1)) assert.Equal(t, k+valueSuffix, items[k].Value)
totalCounter++ totalCounter++
} }
}) })
@ -72,11 +73,12 @@ func TestUnSubscribeConfigurationItems(t *testing.T) {
subscribeID := "" subscribeID := ""
subscribeIDChan := make(chan string) subscribeIDChan := make(chan string)
go func() { go func() {
keys := []string{"mykey1", "mykey2", "mykey3"}
err := testClient.SubscribeConfigurationItems(ctx, "example-config", err := testClient.SubscribeConfigurationItems(ctx, "example-config",
[]string{"mykey", "mykey2", "mykey3"}, func(id string, items []*ConfigurationItem) { keys, func(id string, items map[string]*ConfigurationItem) {
counter.Inc() counter.Inc()
for _, v := range items { for _, k := range keys {
assert.Equal(t, v.Value, v.Key+"_"+strconv.Itoa(int(counter.Load()-1))) assert.Equal(t, k+valueSuffix, items[k].Value)
totalCounter.Inc() totalCounter.Inc()
} }
select { select {

View File

@ -21,8 +21,8 @@ import (
anypb "github.com/golang/protobuf/ptypes/any" anypb "github.com/golang/protobuf/ptypes/any"
"github.com/pkg/errors" "github.com/pkg/errors"
v1 "github.com/dapr/dapr/pkg/proto/common/v1" v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
// DataContent the service invocation content. // DataContent the service invocation content.

View File

@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
v1 "github.com/dapr/dapr/pkg/proto/common/v1" v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
) )
type _testStructwithText struct { type _testStructwithText struct {

View File

@ -18,7 +18,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
// LockRequest is the lock request object. // LockRequest is the lock request object.

View File

@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
const ( const (

View File

@ -20,7 +20,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
const ( const (

View File

@ -18,7 +18,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
// GetSecret retrieves preconfigured secret from specified store using key. // GetSecret retrieves preconfigured secret from specified store using key.

View File

@ -20,8 +20,8 @@ import (
"github.com/golang/protobuf/ptypes/duration" "github.com/golang/protobuf/ptypes/duration"
"github.com/pkg/errors" "github.com/pkg/errors"
v1 "github.com/dapr/dapr/pkg/proto/common/v1" v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
) )
const ( const (

View File

@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
v1 "github.com/dapr/dapr/pkg/proto/common/v1" v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
) )
const ( const (

View File

@ -1,19 +1,29 @@
//
//Copyright 2021 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. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.28.0
// protoc v3.14.0 // protoc v3.21.1
// source: dapr/proto/common/v1/common.proto // source: dapr/proto/common/v1/common.proto
package common package common
import ( import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb" anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
) )
const ( const (
@ -23,12 +33,9 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Type of HTTP 1.1 Methods // Type of HTTP 1.1 Methods
// RFC 7231: https://tools.ietf.org/html/rfc7231#page-24 // RFC 7231: https://tools.ietf.org/html/rfc7231#page-24
// RFC 5789: https://datatracker.ietf.org/doc/html/rfc5789
type HTTPExtension_Verb int32 type HTTPExtension_Verb int32
const ( const (
@ -41,6 +48,7 @@ const (
HTTPExtension_CONNECT HTTPExtension_Verb = 6 HTTPExtension_CONNECT HTTPExtension_Verb = 6
HTTPExtension_OPTIONS HTTPExtension_Verb = 7 HTTPExtension_OPTIONS HTTPExtension_Verb = 7
HTTPExtension_TRACE HTTPExtension_Verb = 8 HTTPExtension_TRACE HTTPExtension_Verb = 8
HTTPExtension_PATCH HTTPExtension_Verb = 9
) )
// Enum value maps for HTTPExtension_Verb. // Enum value maps for HTTPExtension_Verb.
@ -55,6 +63,7 @@ var (
6: "CONNECT", 6: "CONNECT",
7: "OPTIONS", 7: "OPTIONS",
8: "TRACE", 8: "TRACE",
9: "PATCH",
} }
HTTPExtension_Verb_value = map[string]int32{ HTTPExtension_Verb_value = map[string]int32{
"NONE": 0, "NONE": 0,
@ -66,6 +75,7 @@ var (
"CONNECT": 6, "CONNECT": 6,
"OPTIONS": 7, "OPTIONS": 7,
"TRACE": 8, "TRACE": 8,
"PATCH": 9,
} }
) )
@ -597,6 +607,277 @@ func (x *StateOptions) GetConsistency() StateOptions_StateConsistency {
return StateOptions_CONSISTENCY_UNSPECIFIED return StateOptions_CONSISTENCY_UNSPECIFIED
} }
// TopicSubscription represents topic and metadata.
type TopicSubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the pubsub containing the topic below to subscribe to.
PubsubName string `protobuf:"bytes,1,opt,name=pubsub_name,json=pubsubName,proto3" json:"pubsub_name,omitempty"`
// Required. The name of topic which will be subscribed
Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
// The optional properties used for this topic's subscription e.g. session id
Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The optional routing rules to match against. In the gRPC interface, OnTopicEvent
// is still invoked but the matching path is sent in the TopicEventRequest.
Routes *TopicRoutes `protobuf:"bytes,5,opt,name=routes,proto3" json:"routes,omitempty"`
// The optional dead letter queue for this topic to send events to.
DeadLetterTopic string `protobuf:"bytes,6,opt,name=dead_letter_topic,json=deadLetterTopic,proto3" json:"dead_letter_topic,omitempty"`
}
func (x *TopicSubscription) Reset() {
*x = TopicSubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_common_v1_common_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TopicSubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TopicSubscription) ProtoMessage() {}
func (x *TopicSubscription) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_common_v1_common_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 TopicSubscription.ProtoReflect.Descriptor instead.
func (*TopicSubscription) Descriptor() ([]byte, []int) {
return file_dapr_proto_common_v1_common_proto_rawDescGZIP(), []int{6}
}
func (x *TopicSubscription) GetPubsubName() string {
if x != nil {
return x.PubsubName
}
return ""
}
func (x *TopicSubscription) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *TopicSubscription) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
func (x *TopicSubscription) GetRoutes() *TopicRoutes {
if x != nil {
return x.Routes
}
return nil
}
func (x *TopicSubscription) GetDeadLetterTopic() string {
if x != nil {
return x.DeadLetterTopic
}
return ""
}
type TopicRoutes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of rules for this topic.
Rules []*TopicRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
// The default path for this topic.
Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *TopicRoutes) Reset() {
*x = TopicRoutes{}
if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_common_v1_common_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TopicRoutes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TopicRoutes) ProtoMessage() {}
func (x *TopicRoutes) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_common_v1_common_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 TopicRoutes.ProtoReflect.Descriptor instead.
func (*TopicRoutes) Descriptor() ([]byte, []int) {
return file_dapr_proto_common_v1_common_proto_rawDescGZIP(), []int{7}
}
func (x *TopicRoutes) GetRules() []*TopicRule {
if x != nil {
return x.Rules
}
return nil
}
func (x *TopicRoutes) GetDefault() string {
if x != nil {
return x.Default
}
return ""
}
type TopicRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The optional CEL expression used to match the event.
// If the match is not specified, then the route is considered
// the default.
Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
// The path used to identify matches for this subscription.
// This value is passed in TopicEventRequest and used by OnTopicEvent to "switch"
// inside the handler.
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
}
func (x *TopicRule) Reset() {
*x = TopicRule{}
if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_common_v1_common_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TopicRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TopicRule) ProtoMessage() {}
func (x *TopicRule) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_common_v1_common_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 TopicRule.ProtoReflect.Descriptor instead.
func (*TopicRule) Descriptor() ([]byte, []int) {
return file_dapr_proto_common_v1_common_proto_rawDescGZIP(), []int{8}
}
func (x *TopicRule) GetMatch() string {
if x != nil {
return x.Match
}
return ""
}
func (x *TopicRule) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
// ConfigurationItem represents all the configuration with its name(key).
type ConfigurationItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The value of configuration item.
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// Version is response only and cannot be fetched. Store is not expected to keep all versions available
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// the metadata which will be passed to/from configuration store component.
Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *ConfigurationItem) Reset() {
*x = ConfigurationItem{}
if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_common_v1_common_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConfigurationItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfigurationItem) ProtoMessage() {}
func (x *ConfigurationItem) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_common_v1_common_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 ConfigurationItem.ProtoReflect.Descriptor instead.
func (*ConfigurationItem) Descriptor() ([]byte, []int) {
return file_dapr_proto_common_v1_common_proto_rawDescGZIP(), []int{9}
}
func (x *ConfigurationItem) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (x *ConfigurationItem) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *ConfigurationItem) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
var File_dapr_proto_common_v1_common_proto protoreflect.FileDescriptor var File_dapr_proto_common_v1_common_proto protoreflect.FileDescriptor
var file_dapr_proto_common_v1_common_proto_rawDesc = []byte{ var file_dapr_proto_common_v1_common_proto_rawDesc = []byte{
@ -605,91 +886,135 @@ var file_dapr_proto_common_v1_common_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x12, 0x14, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x45, 0x78, 0x74, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x01, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x45, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x01, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x04, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x04,
0x76, 0x65, 0x72, 0x62, 0x12, 0x20, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x74, 0x72, 0x76, 0x65, 0x72, 0x62, 0x12, 0x20, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79,
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x67, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x08, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x72, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x08,
0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10,
0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x50,
0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a,
0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f,
0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x53, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x08, 0x22, 0x4e, 0x53, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x08, 0x12,
0xc0, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x09, 0x22, 0xc0, 0x01, 0x0a, 0x0d, 0x49,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65,
0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 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, 0x4a, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23,
0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21,
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 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, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
0x65, 0x22, 0xa9, 0x02, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x70, 0x72,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x61,
0x67, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x49, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d,
0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x68, 0x74, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a,
0x74, 0x61, 0x12, 0x3c, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x0e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x41, 0x6e, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa9, 0x02, 0x0a,
0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 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, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x61, 0x67, 0x52, 0x04, 0x65, 0x74,
0x61, 0x67, 0x12, 0x49, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74,
0x65, 0x49, 0x74, 0x65, 0x6d, 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, 0x3c, 0x0a,
0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x1c, 0x0a, 0x04, 0x45, 0x74, 0x61, 0x67,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x03, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x65,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75,
0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x64,
0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63,
0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x55,
0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e,
0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x68, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1c, 0x0a, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x04, 0x45, 0x74, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x03, 0x0a, 0x0c, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, 0x57, 0x52, 0x49, 0x54,
0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0b, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e,
0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x43, 0x59, 0x5f, 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x22,
0x0e, 0x32, 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x61, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x6e, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f,
0x6e, 0x63, 0x79, 0x12, 0x55, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f,
0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x4f, 0x4e, 0x47,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x10, 0x02, 0x22, 0xc1, 0x02, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73,
0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x73,
0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0b, 0x63, 0x75, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70,
0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x68, 0x0a, 0x10, 0x53, 0x74, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70,
0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1b, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12,
0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x51, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63,
0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x75,
0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x43, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x57, 0x52, 0x49, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x54, 0x45, 0x10, 0x02, 0x22, 0x61, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01,
0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x53, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x49, 0x53, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52,
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a,
0x45, 0x4e, 0x43, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x11, 0x64, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x70,
0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x53, 0x69, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x61, 0x64, 0x4c, 0x65,
0x54, 0x52, 0x4f, 0x4e, 0x47, 0x10, 0x02, 0x42, 0x6c, 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x74, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74,
0x70, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x74, 0x6f, 0x73, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x64, 0x61, 0x70, 0x72, 0x2f, 0x67, 0x6f, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5e, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52,
0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xaa, 0x02, 0x1b, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69,
0x63, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x35, 0x0a, 0x09, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xd3, 0x01,
0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x42, 0x69, 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x76,
0x31, 0x42, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a,
0x2f, 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, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0xaa, 0x02, 0x1b, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x41,
0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -704,39 +1029,46 @@ func file_dapr_proto_common_v1_common_proto_rawDescGZIP() []byte {
return file_dapr_proto_common_v1_common_proto_rawDescData return file_dapr_proto_common_v1_common_proto_rawDescData
} }
var ( var file_dapr_proto_common_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
file_dapr_proto_common_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_dapr_proto_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
file_dapr_proto_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_dapr_proto_common_v1_common_proto_goTypes = []interface{}{
file_dapr_proto_common_v1_common_proto_goTypes = []interface{}{ (HTTPExtension_Verb)(0), // 0: dapr.proto.common.v1.HTTPExtension.Verb
(HTTPExtension_Verb)(0), // 0: dapr.proto.common.v1.HTTPExtension.Verb (StateOptions_StateConcurrency)(0), // 1: dapr.proto.common.v1.StateOptions.StateConcurrency
(StateOptions_StateConcurrency)(0), // 1: dapr.proto.common.v1.StateOptions.StateConcurrency (StateOptions_StateConsistency)(0), // 2: dapr.proto.common.v1.StateOptions.StateConsistency
(StateOptions_StateConsistency)(0), // 2: dapr.proto.common.v1.StateOptions.StateConsistency (*HTTPExtension)(nil), // 3: dapr.proto.common.v1.HTTPExtension
(*HTTPExtension)(nil), // 3: dapr.proto.common.v1.HTTPExtension (*InvokeRequest)(nil), // 4: dapr.proto.common.v1.InvokeRequest
(*InvokeRequest)(nil), // 4: dapr.proto.common.v1.InvokeRequest (*InvokeResponse)(nil), // 5: dapr.proto.common.v1.InvokeResponse
(*InvokeResponse)(nil), // 5: dapr.proto.common.v1.InvokeResponse (*StateItem)(nil), // 6: dapr.proto.common.v1.StateItem
(*StateItem)(nil), // 6: dapr.proto.common.v1.StateItem (*Etag)(nil), // 7: dapr.proto.common.v1.Etag
(*Etag)(nil), // 7: dapr.proto.common.v1.Etag (*StateOptions)(nil), // 8: dapr.proto.common.v1.StateOptions
(*StateOptions)(nil), // 8: dapr.proto.common.v1.StateOptions (*TopicSubscription)(nil), // 9: dapr.proto.common.v1.TopicSubscription
nil, // 9: dapr.proto.common.v1.StateItem.MetadataEntry (*TopicRoutes)(nil), // 10: dapr.proto.common.v1.TopicRoutes
(*anypb.Any)(nil), // 10: google.protobuf.Any (*TopicRule)(nil), // 11: dapr.proto.common.v1.TopicRule
} (*ConfigurationItem)(nil), // 12: dapr.proto.common.v1.ConfigurationItem
) nil, // 13: dapr.proto.common.v1.StateItem.MetadataEntry
nil, // 14: dapr.proto.common.v1.TopicSubscription.MetadataEntry
nil, // 15: dapr.proto.common.v1.ConfigurationItem.MetadataEntry
(*anypb.Any)(nil), // 16: google.protobuf.Any
}
var file_dapr_proto_common_v1_common_proto_depIdxs = []int32{ var file_dapr_proto_common_v1_common_proto_depIdxs = []int32{
0, // 0: dapr.proto.common.v1.HTTPExtension.verb:type_name -> dapr.proto.common.v1.HTTPExtension.Verb 0, // 0: dapr.proto.common.v1.HTTPExtension.verb:type_name -> dapr.proto.common.v1.HTTPExtension.Verb
10, // 1: dapr.proto.common.v1.InvokeRequest.data:type_name -> google.protobuf.Any 16, // 1: dapr.proto.common.v1.InvokeRequest.data:type_name -> google.protobuf.Any
3, // 2: dapr.proto.common.v1.InvokeRequest.http_extension:type_name -> dapr.proto.common.v1.HTTPExtension 3, // 2: dapr.proto.common.v1.InvokeRequest.http_extension:type_name -> dapr.proto.common.v1.HTTPExtension
10, // 3: dapr.proto.common.v1.InvokeResponse.data:type_name -> google.protobuf.Any 16, // 3: dapr.proto.common.v1.InvokeResponse.data:type_name -> google.protobuf.Any
7, // 4: dapr.proto.common.v1.StateItem.etag:type_name -> dapr.proto.common.v1.Etag 7, // 4: dapr.proto.common.v1.StateItem.etag:type_name -> dapr.proto.common.v1.Etag
9, // 5: dapr.proto.common.v1.StateItem.metadata:type_name -> dapr.proto.common.v1.StateItem.MetadataEntry 13, // 5: dapr.proto.common.v1.StateItem.metadata:type_name -> dapr.proto.common.v1.StateItem.MetadataEntry
8, // 6: dapr.proto.common.v1.StateItem.options:type_name -> dapr.proto.common.v1.StateOptions 8, // 6: dapr.proto.common.v1.StateItem.options:type_name -> dapr.proto.common.v1.StateOptions
1, // 7: dapr.proto.common.v1.StateOptions.concurrency:type_name -> dapr.proto.common.v1.StateOptions.StateConcurrency 1, // 7: dapr.proto.common.v1.StateOptions.concurrency:type_name -> dapr.proto.common.v1.StateOptions.StateConcurrency
2, // 8: dapr.proto.common.v1.StateOptions.consistency:type_name -> dapr.proto.common.v1.StateOptions.StateConsistency 2, // 8: dapr.proto.common.v1.StateOptions.consistency:type_name -> dapr.proto.common.v1.StateOptions.StateConsistency
9, // [9:9] is the sub-list for method output_type 14, // 9: dapr.proto.common.v1.TopicSubscription.metadata:type_name -> dapr.proto.common.v1.TopicSubscription.MetadataEntry
9, // [9:9] is the sub-list for method input_type 10, // 10: dapr.proto.common.v1.TopicSubscription.routes:type_name -> dapr.proto.common.v1.TopicRoutes
9, // [9:9] is the sub-list for extension type_name 11, // 11: dapr.proto.common.v1.TopicRoutes.rules:type_name -> dapr.proto.common.v1.TopicRule
9, // [9:9] is the sub-list for extension extendee 15, // 12: dapr.proto.common.v1.ConfigurationItem.metadata:type_name -> dapr.proto.common.v1.ConfigurationItem.MetadataEntry
0, // [0:9] is the sub-list for field type_name 13, // [13:13] is the sub-list for method output_type
13, // [13:13] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
} }
func init() { file_dapr_proto_common_v1_common_proto_init() } func init() { file_dapr_proto_common_v1_common_proto_init() }
@ -817,6 +1149,54 @@ func file_dapr_proto_common_v1_common_proto_init() {
return nil return nil
} }
} }
file_dapr_proto_common_v1_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TopicSubscription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dapr_proto_common_v1_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TopicRoutes); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dapr_proto_common_v1_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TopicRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dapr_proto_common_v1_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConfigurationItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -824,7 +1204,7 @@ func file_dapr_proto_common_v1_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_dapr_proto_common_v1_common_proto_rawDesc, RawDescriptor: file_dapr_proto_common_v1_common_proto_rawDesc,
NumEnums: 3, NumEnums: 3,
NumMessages: 7, NumMessages: 13,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -1,7 +1,19 @@
//
//Copyright 2021 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. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.28.0
// protoc v3.14.0 // protoc v3.21.1
// source: dapr/proto/runtime/v1/appcallback.proto // source: dapr/proto/runtime/v1/appcallback.proto
package runtime package runtime
@ -10,12 +22,10 @@ import (
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
proto "github.com/golang/protobuf/proto" v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
) )
const ( const (
@ -25,10 +35,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// TopicEventResponseStatus allows apps to have finer control over handling of the message. // TopicEventResponseStatus allows apps to have finer control over handling of the message.
type TopicEventResponse_TopicEventResponseStatus int32 type TopicEventResponse_TopicEventResponseStatus int32
@ -160,6 +166,9 @@ type TopicEventRequest struct {
Topic string `protobuf:"bytes,6,opt,name=topic,proto3" json:"topic,omitempty"` Topic string `protobuf:"bytes,6,opt,name=topic,proto3" json:"topic,omitempty"`
// The name of the pubsub the publisher sent to. // The name of the pubsub the publisher sent to.
PubsubName string `protobuf:"bytes,8,opt,name=pubsub_name,json=pubsubName,proto3" json:"pubsub_name,omitempty"` PubsubName string `protobuf:"bytes,8,opt,name=pubsub_name,json=pubsubName,proto3" json:"pubsub_name,omitempty"`
// The matching path from TopicSubscription/routes (if specified) for this event.
// This value is used by OnTopicEvent to "switch" inside the handler.
Path string `protobuf:"bytes,9,opt,name=path,proto3" json:"path,omitempty"`
} }
func (x *TopicEventRequest) Reset() { func (x *TopicEventRequest) Reset() {
@ -250,6 +259,13 @@ func (x *TopicEventRequest) GetPubsubName() string {
return "" return ""
} }
func (x *TopicEventRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
// TopicEventResponse is response from app on published message // TopicEventResponse is response from app on published message
type TopicEventResponse struct { type TopicEventResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -460,7 +476,7 @@ type ListTopicSubscriptionsResponse struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// The list of topics. // The list of topics.
Subscriptions []*TopicSubscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` Subscriptions []*v1.TopicSubscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
} }
func (x *ListTopicSubscriptionsResponse) Reset() { func (x *ListTopicSubscriptionsResponse) Reset() {
@ -495,80 +511,13 @@ func (*ListTopicSubscriptionsResponse) Descriptor() ([]byte, []int) {
return file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP(), []int{4} return file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP(), []int{4}
} }
func (x *ListTopicSubscriptionsResponse) GetSubscriptions() []*TopicSubscription { func (x *ListTopicSubscriptionsResponse) GetSubscriptions() []*v1.TopicSubscription {
if x != nil { if x != nil {
return x.Subscriptions return x.Subscriptions
} }
return nil return nil
} }
// TopicSubscription represents topic and metadata.
type TopicSubscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the pubsub containing the topic below to subscribe to.
PubsubName string `protobuf:"bytes,1,opt,name=pubsub_name,json=pubsubName,proto3" json:"pubsub_name,omitempty"`
// Required. The name of topic which will be subscribed
Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
// The optional properties used for this topic's subscription e.g. session id
Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *TopicSubscription) Reset() {
*x = TopicSubscription{}
if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TopicSubscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TopicSubscription) ProtoMessage() {}
func (x *TopicSubscription) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_runtime_v1_appcallback_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 TopicSubscription.ProtoReflect.Descriptor instead.
func (*TopicSubscription) Descriptor() ([]byte, []int) {
return file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP(), []int{5}
}
func (x *TopicSubscription) GetPubsubName() string {
if x != nil {
return x.PubsubName
}
return ""
}
func (x *TopicSubscription) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *TopicSubscription) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
// ListInputBindingsResponse is the message including the list of input bindings. // ListInputBindingsResponse is the message including the list of input bindings.
type ListInputBindingsResponse struct { type ListInputBindingsResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -582,7 +531,7 @@ type ListInputBindingsResponse struct {
func (x *ListInputBindingsResponse) Reset() { func (x *ListInputBindingsResponse) Reset() {
*x = ListInputBindingsResponse{} *x = ListInputBindingsResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[6] mi := &file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -595,7 +544,7 @@ func (x *ListInputBindingsResponse) String() string {
func (*ListInputBindingsResponse) ProtoMessage() {} func (*ListInputBindingsResponse) ProtoMessage() {}
func (x *ListInputBindingsResponse) ProtoReflect() protoreflect.Message { func (x *ListInputBindingsResponse) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[6] mi := &file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -608,7 +557,7 @@ func (x *ListInputBindingsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListInputBindingsResponse.ProtoReflect.Descriptor instead. // Deprecated: Use ListInputBindingsResponse.ProtoReflect.Descriptor instead.
func (*ListInputBindingsResponse) Descriptor() ([]byte, []int) { func (*ListInputBindingsResponse) Descriptor() ([]byte, []int) {
return file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP(), []int{6} return file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP(), []int{5}
} }
func (x *ListInputBindingsResponse) GetBindings() []string { func (x *ListInputBindingsResponse) GetBindings() []string {
@ -618,6 +567,46 @@ func (x *ListInputBindingsResponse) GetBindings() []string {
return nil return nil
} }
// HealthCheckResponse is the message with the response to the health check.
// This message is currently empty as used as placeholder.
type HealthCheckResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *HealthCheckResponse) Reset() {
*x = HealthCheckResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HealthCheckResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HealthCheckResponse) ProtoMessage() {}
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
mi := &file_dapr_proto_runtime_v1_appcallback_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 HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
return file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP(), []int{6}
}
var File_dapr_proto_runtime_v1_appcallback_proto protoreflect.FileDescriptor var File_dapr_proto_runtime_v1_appcallback_proto protoreflect.FileDescriptor
var file_dapr_proto_runtime_v1_appcallback_proto_rawDesc = []byte{ var file_dapr_proto_runtime_v1_appcallback_proto_rawDesc = []byte{
@ -629,7 +618,7 @@ var file_dapr_proto_runtime_v1_appcallback_proto_rawDesc = []byte{
0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x64, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x64,
0x61, 0x70, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xe9, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x22, 0xfd, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12,
@ -643,116 +632,112 @@ var file_dapr_proto_runtime_v1_appcallback_proto_rawDesc = []byte{
0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x06, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x70,
0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x12, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70,
0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x73, 0x65, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x3c, 0x0a, 0x18, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x18, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e,
0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x54, 0x52, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x52, 0x4f, 0x50, 0x10, 0x02, 0x22, 0xd0, 0x01, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x0a, 0x13, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x52, 0x45, 0x54, 0x52, 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x52, 0x4f, 0x50, 0x10,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x22, 0xd0, 0x01, 0x0a, 0x13, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
0x38, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x61, 0x12, 0x54, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64,
0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x22, 0xb2, 0x02, 0x0a, 0x14, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb2, 0x02, 0x0a, 0x14, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a,
0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x09, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64,
0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x73, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x73,
0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28,
0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x65, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20,
0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x64, 0x61, 0x70, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x65, 0x0a, 0x0b, 0x63, 0x6f, 0x6e,
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43,
0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52,
0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x37, 0x0a, 0x17,
0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x63,
0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x51, 0x55, 0x45,
0x4e, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x52, 0x41, 0x4c,
0x4c, 0x45, 0x4c, 0x10, 0x01, 0x22, 0x70, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x70,
0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28,
0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x69, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x6e, 0x63, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79,
0x0b, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x22, 0x37, 0x0a, 0x17, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x28, 0x09, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x53,
0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50,
0x6f, 0x70, 0x69, 0x63, 0x12, 0x52, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x41, 0x52, 0x41, 0x4c, 0x4c, 0x45, 0x4c, 0x10, 0x01, 0x22, 0x6f, 0x0a, 0x1e, 0x4c, 0x69, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x73,
0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53,
0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x75, 0x62,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x37, 0x0a, 0x19, 0x4c, 0x69,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x37, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69,
0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69,
0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x6e, 0x67, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x32, 0x86, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x86, 0x04, 0x0a, 0x0b, 0x41,
0x04, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x57, 0x70, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x57, 0x0a, 0x08, 0x4f, 0x6e,
0x0a, 0x08, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72,
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e,
0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61,
0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63,
0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e,
0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x73, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65,
0x22, 0x00, 0x12, 0x65, 0x0a, 0x0c, 0x4f, 0x6e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x0a, 0x0c, 0x4f, 0x6e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28,
0x6e, 0x74, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e,
0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x11, 0x4c, 0x69, 0x73,
0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x0e, 0x4f, 0x6e,
0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x64,
0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x7c, 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x70,
0x70, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x44, 0x61, 0x70, 0x72, 0x41, 0x70, 0x70, 0x43, 0x61, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x34, 0x67, 0x69, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x67, 0x6f, 0x74, 0x79, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6d, 0x65, 0xaa, 0x02, 0x20, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x61, 0x6c, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x0e, 0x4f, 0x6e, 0x42, 0x69, 0x6e, 0x64,
0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e,
0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e,
0x64, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x32, 0x6d, 0x0a, 0x16, 0x41, 0x70, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61,
0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x53, 0x0a,
0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61,
0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x42, 0x79, 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x76, 0x31,
0x42, 0x15, 0x44, 0x61, 0x70, 0x72, 0x41, 0x70, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x31, 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, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f,
0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0xaa, 0x02, 0x20, 0x44, 0x61, 0x70,
0x72, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x41, 0x75,
0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -767,50 +752,48 @@ func file_dapr_proto_runtime_v1_appcallback_proto_rawDescGZIP() []byte {
return file_dapr_proto_runtime_v1_appcallback_proto_rawDescData return file_dapr_proto_runtime_v1_appcallback_proto_rawDescData
} }
var ( var file_dapr_proto_runtime_v1_appcallback_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
file_dapr_proto_runtime_v1_appcallback_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_dapr_proto_runtime_v1_appcallback_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
file_dapr_proto_runtime_v1_appcallback_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_dapr_proto_runtime_v1_appcallback_proto_goTypes = []interface{}{
file_dapr_proto_runtime_v1_appcallback_proto_goTypes = []interface{}{ (TopicEventResponse_TopicEventResponseStatus)(0), // 0: dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus
(TopicEventResponse_TopicEventResponseStatus)(0), // 0: dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus (BindingEventResponse_BindingEventConcurrency)(0), // 1: dapr.proto.runtime.v1.BindingEventResponse.BindingEventConcurrency
(BindingEventResponse_BindingEventConcurrency)(0), // 1: dapr.proto.runtime.v1.BindingEventResponse.BindingEventConcurrency (*TopicEventRequest)(nil), // 2: dapr.proto.runtime.v1.TopicEventRequest
(*TopicEventRequest)(nil), // 2: dapr.proto.runtime.v1.TopicEventRequest (*TopicEventResponse)(nil), // 3: dapr.proto.runtime.v1.TopicEventResponse
(*TopicEventResponse)(nil), // 3: dapr.proto.runtime.v1.TopicEventResponse (*BindingEventRequest)(nil), // 4: dapr.proto.runtime.v1.BindingEventRequest
(*BindingEventRequest)(nil), // 4: dapr.proto.runtime.v1.BindingEventRequest (*BindingEventResponse)(nil), // 5: dapr.proto.runtime.v1.BindingEventResponse
(*BindingEventResponse)(nil), // 5: dapr.proto.runtime.v1.BindingEventResponse (*ListTopicSubscriptionsResponse)(nil), // 6: dapr.proto.runtime.v1.ListTopicSubscriptionsResponse
(*ListTopicSubscriptionsResponse)(nil), // 6: dapr.proto.runtime.v1.ListTopicSubscriptionsResponse (*ListInputBindingsResponse)(nil), // 7: dapr.proto.runtime.v1.ListInputBindingsResponse
(*TopicSubscription)(nil), // 7: dapr.proto.runtime.v1.TopicSubscription (*HealthCheckResponse)(nil), // 8: dapr.proto.runtime.v1.HealthCheckResponse
(*ListInputBindingsResponse)(nil), // 8: dapr.proto.runtime.v1.ListInputBindingsResponse nil, // 9: dapr.proto.runtime.v1.BindingEventRequest.MetadataEntry
nil, // 9: dapr.proto.runtime.v1.BindingEventRequest.MetadataEntry (*v1.StateItem)(nil), // 10: dapr.proto.common.v1.StateItem
nil, // 10: dapr.proto.runtime.v1.TopicSubscription.MetadataEntry (*v1.TopicSubscription)(nil), // 11: dapr.proto.common.v1.TopicSubscription
(*v1.StateItem)(nil), // 11: dapr.proto.common.v1.StateItem (*v1.InvokeRequest)(nil), // 12: dapr.proto.common.v1.InvokeRequest
(*v1.InvokeRequest)(nil), // 12: dapr.proto.common.v1.InvokeRequest (*emptypb.Empty)(nil), // 13: google.protobuf.Empty
(*emptypb.Empty)(nil), // 13: google.protobuf.Empty (*v1.InvokeResponse)(nil), // 14: dapr.proto.common.v1.InvokeResponse
(*v1.InvokeResponse)(nil), // 14: dapr.proto.common.v1.InvokeResponse }
}
)
var file_dapr_proto_runtime_v1_appcallback_proto_depIdxs = []int32{ var file_dapr_proto_runtime_v1_appcallback_proto_depIdxs = []int32{
0, // 0: dapr.proto.runtime.v1.TopicEventResponse.status:type_name -> dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus 0, // 0: dapr.proto.runtime.v1.TopicEventResponse.status:type_name -> dapr.proto.runtime.v1.TopicEventResponse.TopicEventResponseStatus
9, // 1: dapr.proto.runtime.v1.BindingEventRequest.metadata:type_name -> dapr.proto.runtime.v1.BindingEventRequest.MetadataEntry 9, // 1: dapr.proto.runtime.v1.BindingEventRequest.metadata:type_name -> dapr.proto.runtime.v1.BindingEventRequest.MetadataEntry
11, // 2: dapr.proto.runtime.v1.BindingEventResponse.states:type_name -> dapr.proto.common.v1.StateItem 10, // 2: dapr.proto.runtime.v1.BindingEventResponse.states:type_name -> dapr.proto.common.v1.StateItem
1, // 3: dapr.proto.runtime.v1.BindingEventResponse.concurrency:type_name -> dapr.proto.runtime.v1.BindingEventResponse.BindingEventConcurrency 1, // 3: dapr.proto.runtime.v1.BindingEventResponse.concurrency:type_name -> dapr.proto.runtime.v1.BindingEventResponse.BindingEventConcurrency
7, // 4: dapr.proto.runtime.v1.ListTopicSubscriptionsResponse.subscriptions:type_name -> dapr.proto.runtime.v1.TopicSubscription 11, // 4: dapr.proto.runtime.v1.ListTopicSubscriptionsResponse.subscriptions:type_name -> dapr.proto.common.v1.TopicSubscription
10, // 5: dapr.proto.runtime.v1.TopicSubscription.metadata:type_name -> dapr.proto.runtime.v1.TopicSubscription.MetadataEntry 12, // 5: dapr.proto.runtime.v1.AppCallback.OnInvoke:input_type -> dapr.proto.common.v1.InvokeRequest
12, // 6: dapr.proto.runtime.v1.AppCallback.OnInvoke:input_type -> dapr.proto.common.v1.InvokeRequest 13, // 6: dapr.proto.runtime.v1.AppCallback.ListTopicSubscriptions:input_type -> google.protobuf.Empty
13, // 7: dapr.proto.runtime.v1.AppCallback.ListTopicSubscriptions:input_type -> google.protobuf.Empty 2, // 7: dapr.proto.runtime.v1.AppCallback.OnTopicEvent:input_type -> dapr.proto.runtime.v1.TopicEventRequest
2, // 8: dapr.proto.runtime.v1.AppCallback.OnTopicEvent:input_type -> dapr.proto.runtime.v1.TopicEventRequest 13, // 8: dapr.proto.runtime.v1.AppCallback.ListInputBindings:input_type -> google.protobuf.Empty
13, // 9: dapr.proto.runtime.v1.AppCallback.ListInputBindings:input_type -> google.protobuf.Empty 4, // 9: dapr.proto.runtime.v1.AppCallback.OnBindingEvent:input_type -> dapr.proto.runtime.v1.BindingEventRequest
4, // 10: dapr.proto.runtime.v1.AppCallback.OnBindingEvent:input_type -> dapr.proto.runtime.v1.BindingEventRequest 13, // 10: dapr.proto.runtime.v1.AppCallbackHealthCheck.HealthCheck:input_type -> google.protobuf.Empty
14, // 11: dapr.proto.runtime.v1.AppCallback.OnInvoke:output_type -> dapr.proto.common.v1.InvokeResponse 14, // 11: dapr.proto.runtime.v1.AppCallback.OnInvoke:output_type -> dapr.proto.common.v1.InvokeResponse
6, // 12: dapr.proto.runtime.v1.AppCallback.ListTopicSubscriptions:output_type -> dapr.proto.runtime.v1.ListTopicSubscriptionsResponse 6, // 12: dapr.proto.runtime.v1.AppCallback.ListTopicSubscriptions:output_type -> dapr.proto.runtime.v1.ListTopicSubscriptionsResponse
3, // 13: dapr.proto.runtime.v1.AppCallback.OnTopicEvent:output_type -> dapr.proto.runtime.v1.TopicEventResponse 3, // 13: dapr.proto.runtime.v1.AppCallback.OnTopicEvent:output_type -> dapr.proto.runtime.v1.TopicEventResponse
8, // 14: dapr.proto.runtime.v1.AppCallback.ListInputBindings:output_type -> dapr.proto.runtime.v1.ListInputBindingsResponse 7, // 14: dapr.proto.runtime.v1.AppCallback.ListInputBindings:output_type -> dapr.proto.runtime.v1.ListInputBindingsResponse
5, // 15: dapr.proto.runtime.v1.AppCallback.OnBindingEvent:output_type -> dapr.proto.runtime.v1.BindingEventResponse 5, // 15: dapr.proto.runtime.v1.AppCallback.OnBindingEvent:output_type -> dapr.proto.runtime.v1.BindingEventResponse
11, // [11:16] is the sub-list for method output_type 8, // 16: dapr.proto.runtime.v1.AppCallbackHealthCheck.HealthCheck:output_type -> dapr.proto.runtime.v1.HealthCheckResponse
6, // [6:11] is the sub-list for method input_type 11, // [11:17] is the sub-list for method output_type
6, // [6:6] is the sub-list for extension type_name 5, // [5:11] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension extendee 5, // [5:5] is the sub-list for extension type_name
0, // [0:6] is the sub-list for field type_name 5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
} }
func init() { file_dapr_proto_runtime_v1_appcallback_proto_init() } func init() { file_dapr_proto_runtime_v1_appcallback_proto_init() }
@ -880,7 +863,7 @@ func file_dapr_proto_runtime_v1_appcallback_proto_init() {
} }
} }
file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TopicSubscription); i { switch v := v.(*ListInputBindingsResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -892,7 +875,7 @@ func file_dapr_proto_runtime_v1_appcallback_proto_init() {
} }
} }
file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_dapr_proto_runtime_v1_appcallback_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListInputBindingsResponse); i { switch v := v.(*HealthCheckResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -910,9 +893,9 @@ func file_dapr_proto_runtime_v1_appcallback_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_dapr_proto_runtime_v1_appcallback_proto_rawDesc, RawDescriptor: file_dapr_proto_runtime_v1_appcallback_proto_rawDesc,
NumEnums: 2, NumEnums: 2,
NumMessages: 9, NumMessages: 8,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 2,
}, },
GoTypes: file_dapr_proto_runtime_v1_appcallback_proto_goTypes, GoTypes: file_dapr_proto_runtime_v1_appcallback_proto_goTypes,
DependencyIndexes: file_dapr_proto_runtime_v1_appcallback_proto_depIdxs, DependencyIndexes: file_dapr_proto_runtime_v1_appcallback_proto_depIdxs,

View File

@ -1,16 +1,19 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // 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/runtime/v1/appcallback.proto
package runtime package runtime
import ( import (
context "context" context "context"
v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
) )
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
@ -91,7 +94,7 @@ func (c *appCallbackClient) OnBindingEvent(ctx context.Context, in *BindingEvent
} }
// AppCallbackServer is the server API for AppCallback service. // AppCallbackServer is the server API for AppCallback service.
// All implementations must embed UnimplementedAppCallbackServer // All implementations should embed UnimplementedAppCallbackServer
// for forward compatibility // for forward compatibility
type AppCallbackServer interface { type AppCallbackServer interface {
// Invokes service method with InvokeRequest. // Invokes service method with InvokeRequest.
@ -107,32 +110,27 @@ type AppCallbackServer interface {
// User application can save the states or send the events to the output // User application can save the states or send the events to the output
// bindings optionally by returning BindingEventResponse. // bindings optionally by returning BindingEventResponse.
OnBindingEvent(context.Context, *BindingEventRequest) (*BindingEventResponse, error) OnBindingEvent(context.Context, *BindingEventRequest) (*BindingEventResponse, error)
mustEmbedUnimplementedAppCallbackServer()
} }
// UnimplementedAppCallbackServer must be embedded to have forward compatible implementations. // UnimplementedAppCallbackServer should be embedded to have forward compatible implementations.
type UnimplementedAppCallbackServer struct{} type UnimplementedAppCallbackServer struct {
}
func (UnimplementedAppCallbackServer) OnInvoke(context.Context, *v1.InvokeRequest) (*v1.InvokeResponse, error) { func (UnimplementedAppCallbackServer) OnInvoke(context.Context, *v1.InvokeRequest) (*v1.InvokeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnInvoke not implemented") return nil, status.Errorf(codes.Unimplemented, "method OnInvoke not implemented")
} }
func (UnimplementedAppCallbackServer) ListTopicSubscriptions(context.Context, *emptypb.Empty) (*ListTopicSubscriptionsResponse, error) { func (UnimplementedAppCallbackServer) ListTopicSubscriptions(context.Context, *emptypb.Empty) (*ListTopicSubscriptionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListTopicSubscriptions not implemented") return nil, status.Errorf(codes.Unimplemented, "method ListTopicSubscriptions not implemented")
} }
func (UnimplementedAppCallbackServer) OnTopicEvent(context.Context, *TopicEventRequest) (*TopicEventResponse, error) { func (UnimplementedAppCallbackServer) OnTopicEvent(context.Context, *TopicEventRequest) (*TopicEventResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnTopicEvent not implemented") return nil, status.Errorf(codes.Unimplemented, "method OnTopicEvent not implemented")
} }
func (UnimplementedAppCallbackServer) ListInputBindings(context.Context, *emptypb.Empty) (*ListInputBindingsResponse, error) { func (UnimplementedAppCallbackServer) ListInputBindings(context.Context, *emptypb.Empty) (*ListInputBindingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListInputBindings not implemented") return nil, status.Errorf(codes.Unimplemented, "method ListInputBindings not implemented")
} }
func (UnimplementedAppCallbackServer) OnBindingEvent(context.Context, *BindingEventRequest) (*BindingEventResponse, error) { func (UnimplementedAppCallbackServer) OnBindingEvent(context.Context, *BindingEventRequest) (*BindingEventResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnBindingEvent not implemented") return nil, status.Errorf(codes.Unimplemented, "method OnBindingEvent not implemented")
} }
func (UnimplementedAppCallbackServer) mustEmbedUnimplementedAppCallbackServer() {}
// UnsafeAppCallbackServer may be embedded to opt out of forward compatibility for this service. // UnsafeAppCallbackServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AppCallbackServer will // Use of this interface is not recommended, as added methods to AppCallbackServer will
@ -266,3 +264,89 @@ var AppCallback_ServiceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "dapr/proto/runtime/v1/appcallback.proto", Metadata: "dapr/proto/runtime/v1/appcallback.proto",
} }
// AppCallbackHealthCheckClient is the client API for AppCallbackHealthCheck 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 AppCallbackHealthCheckClient interface {
// Health check.
HealthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
type appCallbackHealthCheckClient struct {
cc grpc.ClientConnInterface
}
func NewAppCallbackHealthCheckClient(cc grpc.ClientConnInterface) AppCallbackHealthCheckClient {
return &appCallbackHealthCheckClient{cc}
}
func (c *appCallbackHealthCheckClient) HealthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
out := new(HealthCheckResponse)
err := c.cc.Invoke(ctx, "/dapr.proto.runtime.v1.AppCallbackHealthCheck/HealthCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AppCallbackHealthCheckServer is the server API for AppCallbackHealthCheck service.
// All implementations should embed UnimplementedAppCallbackHealthCheckServer
// for forward compatibility
type AppCallbackHealthCheckServer interface {
// Health check.
HealthCheck(context.Context, *emptypb.Empty) (*HealthCheckResponse, error)
}
// UnimplementedAppCallbackHealthCheckServer should be embedded to have forward compatible implementations.
type UnimplementedAppCallbackHealthCheckServer struct {
}
func (UnimplementedAppCallbackHealthCheckServer) HealthCheck(context.Context, *emptypb.Empty) (*HealthCheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
}
// UnsafeAppCallbackHealthCheckServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AppCallbackHealthCheckServer will
// result in compilation errors.
type UnsafeAppCallbackHealthCheckServer interface {
mustEmbedUnimplementedAppCallbackHealthCheckServer()
}
func RegisterAppCallbackHealthCheckServer(s grpc.ServiceRegistrar, srv AppCallbackHealthCheckServer) {
s.RegisterService(&AppCallbackHealthCheck_ServiceDesc, srv)
}
func _AppCallbackHealthCheck_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AppCallbackHealthCheckServer).HealthCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dapr.proto.runtime.v1.AppCallbackHealthCheck/HealthCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AppCallbackHealthCheckServer).HealthCheck(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
// AppCallbackHealthCheck_ServiceDesc is the grpc.ServiceDesc for AppCallbackHealthCheck service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AppCallbackHealthCheck_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dapr.proto.runtime.v1.AppCallbackHealthCheck",
HandlerType: (*AppCallbackHealthCheckServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "HealthCheck",
Handler: _AppCallbackHealthCheck_HealthCheck_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dapr/proto/runtime/v1/appcallback.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,15 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // 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/runtime/v1/dapr.proto
package runtime package runtime
import ( import (
context "context" context "context"
v1 "github.com/dapr/dapr/pkg/proto/common/v1"
v1 "github.com/dapr/go-sdk/dapr/proto/common/v1"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
@ -64,6 +69,12 @@ type DaprClient interface {
GetConfigurationAlpha1(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) GetConfigurationAlpha1(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error)
// SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream // SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream
SubscribeConfigurationAlpha1(ctx context.Context, in *SubscribeConfigurationRequest, opts ...grpc.CallOption) (Dapr_SubscribeConfigurationAlpha1Client, error) SubscribeConfigurationAlpha1(ctx context.Context, in *SubscribeConfigurationRequest, opts ...grpc.CallOption) (Dapr_SubscribeConfigurationAlpha1Client, error)
// UnSubscribeConfiguration unsubscribe the subscription of configuration
UnsubscribeConfigurationAlpha1(ctx context.Context, in *UnsubscribeConfigurationRequest, opts ...grpc.CallOption) (*UnsubscribeConfigurationResponse, error)
// TryLockAlpha1 tries to get a lock with an expiry.
TryLockAlpha1(ctx context.Context, in *TryLockRequest, opts ...grpc.CallOption) (*TryLockResponse, error)
// UnlockAlpha1 unlocks a lock.
UnlockAlpha1(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
// Gets metadata of the sidecar // Gets metadata of the sidecar
GetMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMetadataResponse, error) GetMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMetadataResponse, error)
// Sets value in extended metadata of the sidecar // Sets value in extended metadata of the sidecar
@ -301,6 +312,33 @@ func (x *daprSubscribeConfigurationAlpha1Client) Recv() (*SubscribeConfiguration
return m, nil return m, nil
} }
func (c *daprClient) UnsubscribeConfigurationAlpha1(ctx context.Context, in *UnsubscribeConfigurationRequest, opts ...grpc.CallOption) (*UnsubscribeConfigurationResponse, error) {
out := new(UnsubscribeConfigurationResponse)
err := c.cc.Invoke(ctx, "/dapr.proto.runtime.v1.Dapr/UnsubscribeConfigurationAlpha1", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *daprClient) TryLockAlpha1(ctx context.Context, in *TryLockRequest, opts ...grpc.CallOption) (*TryLockResponse, error) {
out := new(TryLockResponse)
err := c.cc.Invoke(ctx, "/dapr.proto.runtime.v1.Dapr/TryLockAlpha1", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *daprClient) UnlockAlpha1(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
out := new(UnlockResponse)
err := c.cc.Invoke(ctx, "/dapr.proto.runtime.v1.Dapr/UnlockAlpha1", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *daprClient) GetMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMetadataResponse, error) { func (c *daprClient) GetMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMetadataResponse, error) {
out := new(GetMetadataResponse) out := new(GetMetadataResponse)
err := c.cc.Invoke(ctx, "/dapr.proto.runtime.v1.Dapr/GetMetadata", in, out, opts...) err := c.cc.Invoke(ctx, "/dapr.proto.runtime.v1.Dapr/GetMetadata", in, out, opts...)
@ -376,6 +414,12 @@ type DaprServer interface {
GetConfigurationAlpha1(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) GetConfigurationAlpha1(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error)
// SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream // SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream
SubscribeConfigurationAlpha1(*SubscribeConfigurationRequest, Dapr_SubscribeConfigurationAlpha1Server) error SubscribeConfigurationAlpha1(*SubscribeConfigurationRequest, Dapr_SubscribeConfigurationAlpha1Server) error
// UnSubscribeConfiguration unsubscribe the subscription of configuration
UnsubscribeConfigurationAlpha1(context.Context, *UnsubscribeConfigurationRequest) (*UnsubscribeConfigurationResponse, error)
// TryLockAlpha1 tries to get a lock with an expiry.
TryLockAlpha1(context.Context, *TryLockRequest) (*TryLockResponse, error)
// UnlockAlpha1 unlocks a lock.
UnlockAlpha1(context.Context, *UnlockRequest) (*UnlockResponse, error)
// Gets metadata of the sidecar // Gets metadata of the sidecar
GetMetadata(context.Context, *emptypb.Empty) (*GetMetadataResponse, error) GetMetadata(context.Context, *emptypb.Empty) (*GetMetadataResponse, error)
// Sets value in extended metadata of the sidecar // Sets value in extended metadata of the sidecar
@ -454,6 +498,15 @@ func (UnimplementedDaprServer) GetConfigurationAlpha1(context.Context, *GetConfi
func (UnimplementedDaprServer) SubscribeConfigurationAlpha1(*SubscribeConfigurationRequest, Dapr_SubscribeConfigurationAlpha1Server) error { func (UnimplementedDaprServer) SubscribeConfigurationAlpha1(*SubscribeConfigurationRequest, Dapr_SubscribeConfigurationAlpha1Server) error {
return status.Errorf(codes.Unimplemented, "method SubscribeConfigurationAlpha1 not implemented") return status.Errorf(codes.Unimplemented, "method SubscribeConfigurationAlpha1 not implemented")
} }
func (UnimplementedDaprServer) UnsubscribeConfigurationAlpha1(context.Context, *UnsubscribeConfigurationRequest) (*UnsubscribeConfigurationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnsubscribeConfigurationAlpha1 not implemented")
}
func (UnimplementedDaprServer) TryLockAlpha1(context.Context, *TryLockRequest) (*TryLockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method TryLockAlpha1 not implemented")
}
func (UnimplementedDaprServer) UnlockAlpha1(context.Context, *UnlockRequest) (*UnlockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnlockAlpha1 not implemented")
}
func (UnimplementedDaprServer) GetMetadata(context.Context, *emptypb.Empty) (*GetMetadataResponse, error) { func (UnimplementedDaprServer) GetMetadata(context.Context, *emptypb.Empty) (*GetMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented")
} }
@ -874,6 +927,60 @@ func (x *daprSubscribeConfigurationAlpha1Server) Send(m *SubscribeConfigurationR
return x.ServerStream.SendMsg(m) return x.ServerStream.SendMsg(m)
} }
func _Dapr_UnsubscribeConfigurationAlpha1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnsubscribeConfigurationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DaprServer).UnsubscribeConfigurationAlpha1(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dapr.proto.runtime.v1.Dapr/UnsubscribeConfigurationAlpha1",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DaprServer).UnsubscribeConfigurationAlpha1(ctx, req.(*UnsubscribeConfigurationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Dapr_TryLockAlpha1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TryLockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DaprServer).TryLockAlpha1(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dapr.proto.runtime.v1.Dapr/TryLockAlpha1",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DaprServer).TryLockAlpha1(ctx, req.(*TryLockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Dapr_UnlockAlpha1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnlockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DaprServer).UnlockAlpha1(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dapr.proto.runtime.v1.Dapr/UnlockAlpha1",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DaprServer).UnlockAlpha1(ctx, req.(*UnlockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Dapr_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Dapr_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty) in := new(emptypb.Empty)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -1019,6 +1126,18 @@ var Dapr_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetConfigurationAlpha1", MethodName: "GetConfigurationAlpha1",
Handler: _Dapr_GetConfigurationAlpha1_Handler, Handler: _Dapr_GetConfigurationAlpha1_Handler,
}, },
{
MethodName: "UnsubscribeConfigurationAlpha1",
Handler: _Dapr_UnsubscribeConfigurationAlpha1_Handler,
},
{
MethodName: "TryLockAlpha1",
Handler: _Dapr_TryLockAlpha1_Handler,
},
{
MethodName: "UnlockAlpha1",
Handler: _Dapr_UnlockAlpha1_Handler,
},
{ {
MethodName: "GetMetadata", MethodName: "GetMetadata",
Handler: _Dapr_GetMetadata_Handler, Handler: _Dapr_GetMetadata_Handler,

2
go.mod
View File

@ -3,7 +3,6 @@ module github.com/dapr/go-sdk
go 1.17 go 1.17
require ( require (
github.com/dapr/dapr v1.8.0
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.4 github.com/stretchr/testify v1.7.4
@ -21,6 +20,7 @@ require (
require ( require (
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect

3
go.sum
View File

@ -12,8 +12,6 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/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/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/dapr/dapr v1.8.0 h1:ZAAoBe6wuFp7k4tIHB7ajZXVTtGeDeVqIPrldzo3dF0=
github.com/dapr/dapr v1.8.0/go.mod h1:yAsDiK5oecG0htw2S8JG9RFaeHJVdlTfZyOrL57AvRM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -50,6 +48,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.5/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.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=

View File

@ -28,6 +28,8 @@ const (
// Service represents Dapr callback service. // Service represents Dapr callback service.
type Service interface { type Service interface {
// AddHealthCheckHandler sets a health check handler, name: http (router) and grpc (invalid).
AddHealthCheckHandler(name string, fn HealthCheckHandler) error
// AddServiceInvocationHandler appends provided service invocation handler with its name to the service. // AddServiceInvocationHandler appends provided service invocation handler with its name to the service.
AddServiceInvocationHandler(name string, fn ServiceInvocationHandler) error AddServiceInvocationHandler(name string, fn ServiceInvocationHandler) error
// AddTopicEventHandler appends provided event handler with its topic and optional metadata to the service. // AddTopicEventHandler appends provided event handler with its topic and optional metadata to the service.
@ -49,4 +51,5 @@ type (
ServiceInvocationHandler func(ctx context.Context, in *InvocationEvent) (out *Content, err error) ServiceInvocationHandler func(ctx context.Context, in *InvocationEvent) (out *Content, err error)
TopicEventHandler func(ctx context.Context, e *TopicEvent) (retry bool, err error) TopicEventHandler func(ctx context.Context, e *TopicEvent) (retry bool, err error)
BindingInvocationHandler func(ctx context.Context, in *BindingEvent) (out []byte, err error) BindingInvocationHandler func(ctx context.Context, in *BindingEvent) (out []byte, err error)
HealthCheckHandler func(context.Context) error
) )

View File

@ -20,7 +20,7 @@ import (
"github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/empty"
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
"github.com/dapr/go-sdk/service/common" "github.com/dapr/go-sdk/service/common"
) )

View File

@ -21,7 +21,7 @@ import (
"github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/empty"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
runtime "github.com/dapr/dapr/pkg/proto/runtime/v1" runtime "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
"github.com/dapr/go-sdk/service/common" "github.com/dapr/go-sdk/service/common"
) )

View File

@ -0,0 +1,48 @@
/*
Copyright 2021 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 grpc
import (
"context"
"fmt"
pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
"github.com/dapr/go-sdk/service/common"
"google.golang.org/protobuf/types/known/emptypb"
)
// AddHealthCheckHandler appends provided app health check handler.
func (s *Server) AddHealthCheckHandler(_ string, fn common.HealthCheckHandler) error {
if fn == nil {
return fmt.Errorf("health check handler required")
}
s.healthCheckHandler = fn
return nil
}
// HealthCheck check app health status.
func (s *Server) HealthCheck(ctx context.Context, _ *emptypb.Empty) (*pb.HealthCheckResponse, error) {
if s.healthCheckHandler != nil {
if err := s.healthCheckHandler(ctx); err != nil {
return &pb.HealthCheckResponse{}, err
}
return &pb.HealthCheckResponse{}, nil
}
return nil, fmt.Errorf("health check handler not implemented")
}

View File

@ -0,0 +1,67 @@
/*
Copyright 2021 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 grpc
import (
"context"
"testing"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
)
func testHealthCheckHandler(ctx context.Context) (err error) {
return nil
}
func testHealthCheckHandlerWithError(ctx context.Context) (err error) {
return errors.New("app is unhealthy")
}
func TestHealthCheckHandlerForErrors(t *testing.T) {
server := getTestServer()
err := server.AddHealthCheckHandler("", nil)
assert.Errorf(t, err, "expected error on nil health check handler")
}
// go test -timeout 30s ./service/grpc -count 1 -run ^TestHealthCheck$
func TestHealthCheck(t *testing.T) {
ctx := context.Background()
server := getTestServer()
startTestServer(server)
t.Run("health check without handler", func(t *testing.T) {
_, err := server.HealthCheck(ctx, nil)
assert.Error(t, err)
})
err := server.AddHealthCheckHandler("", testHealthCheckHandler)
assert.Nil(t, err)
t.Run("health check with handler", func(t *testing.T) {
_, err = server.HealthCheck(ctx, nil)
assert.Nil(t, err)
})
err = server.AddHealthCheckHandler("", testHealthCheckHandlerWithError)
assert.Nil(t, err)
t.Run("health check with error handler", func(t *testing.T) {
_, err = server.HealthCheck(ctx, nil)
assert.Error(t, err)
})
stopTestServer(t, server)
}

View File

@ -21,7 +21,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"google.golang.org/grpc/metadata" "google.golang.org/grpc/metadata"
cpb "github.com/dapr/dapr/pkg/proto/common/v1" cpb "github.com/dapr/go-sdk/dapr/proto/common/v1"
cc "github.com/dapr/go-sdk/service/common" cc "github.com/dapr/go-sdk/service/common"
) )

View File

@ -23,7 +23,7 @@ import (
"google.golang.org/grpc/metadata" "google.golang.org/grpc/metadata"
"google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/anypb"
"github.com/dapr/dapr/pkg/proto/common/v1" "github.com/dapr/go-sdk/dapr/proto/common/v1"
cc "github.com/dapr/go-sdk/service/common" cc "github.com/dapr/go-sdk/service/common"
) )

View File

@ -20,7 +20,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"google.golang.org/grpc" "google.golang.org/grpc"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
"github.com/dapr/go-sdk/actor" "github.com/dapr/go-sdk/actor"
"github.com/dapr/go-sdk/actor/config" "github.com/dapr/go-sdk/actor/config"
@ -60,12 +60,14 @@ func newService(lis net.Listener) *Server {
// Server is the gRPC service implementation for Dapr. // Server is the gRPC service implementation for Dapr.
type Server struct { type Server struct {
pb.UnimplementedAppCallbackServer pb.UnimplementedAppCallbackServer
listener net.Listener pb.UnimplementedAppCallbackHealthCheckServer
invokeHandlers map[string]common.ServiceInvocationHandler listener net.Listener
topicRegistrar internal.TopicRegistrar invokeHandlers map[string]common.ServiceInvocationHandler
bindingHandlers map[string]common.BindingInvocationHandler topicRegistrar internal.TopicRegistrar
authToken string bindingHandlers map[string]common.BindingInvocationHandler
grpcServer *grpc.Server healthCheckHandler common.HealthCheckHandler
authToken string
grpcServer *grpc.Server
} }
func (s *Server) RegisterActorImplFactory(f actor.Factory, opts ...config.Option) { func (s *Server) RegisterActorImplFactory(f actor.Factory, opts ...config.Option) {
@ -76,6 +78,7 @@ func (s *Server) RegisterActorImplFactory(f actor.Factory, opts ...config.Option
func (s *Server) Start() error { func (s *Server) Start() error {
gs := grpc.NewServer() gs := grpc.NewServer()
pb.RegisterAppCallbackServer(gs, s) pb.RegisterAppCallbackServer(gs, s)
pb.RegisterAppCallbackHealthCheckServer(gs, s)
s.grpcServer = gs s.grpcServer = gs
return gs.Serve(s.listener) return gs.Serve(s.listener)
} }

View File

@ -23,7 +23,8 @@ import (
"github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/empty"
"github.com/pkg/errors" "github.com/pkg/errors"
pb "github.com/dapr/dapr/pkg/proto/runtime/v1" commonv1pb "github.com/dapr/go-sdk/dapr/proto/common/v1"
runtimev1pb "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
"github.com/dapr/go-sdk/service/common" "github.com/dapr/go-sdk/service/common"
"github.com/dapr/go-sdk/service/internal" "github.com/dapr/go-sdk/service/internal"
) )
@ -41,11 +42,11 @@ func (s *Server) AddTopicEventHandler(sub *common.Subscription, fn common.TopicE
} }
// ListTopicSubscriptions is called by Dapr to get the list of topics in a pubsub component the app wants to subscribe to. // ListTopicSubscriptions is called by Dapr to get the list of topics in a pubsub component the app wants to subscribe to.
func (s *Server) ListTopicSubscriptions(ctx context.Context, in *empty.Empty) (*pb.ListTopicSubscriptionsResponse, error) { func (s *Server) ListTopicSubscriptions(ctx context.Context, in *empty.Empty) (*runtimev1pb.ListTopicSubscriptionsResponse, error) {
subs := make([]*pb.TopicSubscription, 0) subs := make([]*commonv1pb.TopicSubscription, 0)
for _, v := range s.topicRegistrar { for _, v := range s.topicRegistrar {
s := v.Subscription s := v.Subscription
sub := &pb.TopicSubscription{ sub := &commonv1pb.TopicSubscription{
PubsubName: s.PubsubName, PubsubName: s.PubsubName,
Topic: s.Topic, Topic: s.Topic,
Metadata: s.Metadata, Metadata: s.Metadata,
@ -54,23 +55,23 @@ func (s *Server) ListTopicSubscriptions(ctx context.Context, in *empty.Empty) (*
subs = append(subs, sub) subs = append(subs, sub)
} }
return &pb.ListTopicSubscriptionsResponse{ return &runtimev1pb.ListTopicSubscriptionsResponse{
Subscriptions: subs, Subscriptions: subs,
}, nil }, nil
} }
func convertRoutes(routes *internal.TopicRoutes) *pb.TopicRoutes { func convertRoutes(routes *internal.TopicRoutes) *commonv1pb.TopicRoutes {
if routes == nil { if routes == nil {
return nil return nil
} }
rules := make([]*pb.TopicRule, len(routes.Rules)) rules := make([]*commonv1pb.TopicRule, len(routes.Rules))
for i, rule := range routes.Rules { for i, rule := range routes.Rules {
rules[i] = &pb.TopicRule{ rules[i] = &commonv1pb.TopicRule{
Match: rule.Match, Match: rule.Match,
Path: rule.Path, Path: rule.Path,
} }
} }
return &pb.TopicRoutes{ return &commonv1pb.TopicRoutes{
Rules: rules, Rules: rules,
Default: routes.Default, Default: routes.Default,
} }
@ -78,11 +79,11 @@ func convertRoutes(routes *internal.TopicRoutes) *pb.TopicRoutes {
// OnTopicEvent fired whenever a message has been published to a topic that has been subscribed. // OnTopicEvent fired whenever a message has been published to a topic that has been subscribed.
// Dapr sends published messages in a CloudEvents v1.0 envelope. // Dapr sends published messages in a CloudEvents v1.0 envelope.
func (s *Server) OnTopicEvent(ctx context.Context, in *pb.TopicEventRequest) (*pb.TopicEventResponse, error) { func (s *Server) OnTopicEvent(ctx context.Context, in *runtimev1pb.TopicEventRequest) (*runtimev1pb.TopicEventResponse, error) {
if in == nil || in.Topic == "" || in.PubsubName == "" { if in == nil || in.Topic == "" || in.PubsubName == "" {
// this is really Dapr issue more than the event request format. // this is really Dapr issue more than the event request format.
// since Dapr will not get updated until long after this event expires, just drop it // since Dapr will not get updated until long after this event expires, just drop it
return &pb.TopicEventResponse{Status: pb.TopicEventResponse_DROP}, errors.New("pub/sub and topic names required") return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_DROP}, errors.New("pub/sub and topic names required")
} }
key := in.PubsubName + "-" + in.Topic key := in.PubsubName + "-" + in.Topic
noValidationKey := in.PubsubName noValidationKey := in.PubsubName
@ -138,21 +139,21 @@ func (s *Server) OnTopicEvent(ctx context.Context, in *pb.TopicEventRequest) (*p
} }
} }
if h == nil { if h == nil {
return &pb.TopicEventResponse{Status: pb.TopicEventResponse_RETRY}, fmt.Errorf( return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_RETRY}, fmt.Errorf(
"route %s for pub/sub and topic combination not configured: %s/%s", "route %s for pub/sub and topic combination not configured: %s/%s",
in.Path, in.PubsubName, in.Topic, in.Path, in.PubsubName, in.Topic,
) )
} }
retry, err := h(ctx, e) retry, err := h(ctx, e)
if err == nil { if err == nil {
return &pb.TopicEventResponse{Status: pb.TopicEventResponse_SUCCESS}, nil return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_SUCCESS}, nil
} }
if retry { if retry {
return &pb.TopicEventResponse{Status: pb.TopicEventResponse_RETRY}, err return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_RETRY}, err
} }
return &pb.TopicEventResponse{Status: pb.TopicEventResponse_DROP}, err return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_DROP}, err
} }
return &pb.TopicEventResponse{Status: pb.TopicEventResponse_RETRY}, fmt.Errorf( return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_RETRY}, fmt.Errorf(
"pub/sub and topic combination not configured: %s/%s", "pub/sub and topic combination not configured: %s/%s",
in.PubsubName, in.Topic, in.PubsubName, in.Topic,
) )

View File

@ -21,7 +21,7 @@ import (
"github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/empty"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
runtime "github.com/dapr/dapr/pkg/proto/runtime/v1" runtime "github.com/dapr/go-sdk/dapr/proto/runtime/v1"
"github.com/dapr/go-sdk/service/common" "github.com/dapr/go-sdk/service/common"
) )

View File

@ -0,0 +1,45 @@
/*
Copyright 2021 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 http
import (
"fmt"
"net/http"
"strings"
"github.com/dapr/go-sdk/service/common"
)
// AddHealthCheckHandler appends provided app health check handler.
func (s *Server) AddHealthCheckHandler(route string, fn common.HealthCheckHandler) error {
if fn == nil {
return fmt.Errorf("health check handler required")
}
if !strings.HasPrefix(route, "/") {
route = fmt.Sprintf("/%s", route)
}
s.mux.Handle(route, optionsHandler(http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if err := fn(r.Context()); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.WriteHeader(http.StatusNoContent)
})))
return nil
}

View File

@ -0,0 +1,68 @@
/*
Copyright 2021 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 http
import (
"context"
"errors"
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestHealthCheckHandlerWithoutHandler(t *testing.T) {
s := newServer("", nil)
err := s.AddHealthCheckHandler("/", nil)
assert.Errorf(t, err, "expected error adding nil health check handler")
}
func TestHealthCheckHandler(t *testing.T) {
t.Run("health check with http status 200", func(t *testing.T) {
s := newServer("", nil)
err := s.AddHealthCheckHandler("/", func(ctx context.Context) (err error) {
return nil
})
assert.NoError(t, err)
req, err := http.NewRequest(http.MethodGet, "/", nil)
assert.NoErrorf(t, err, "error creating request")
req.Header.Set("Content-Type", "application/json")
resp := httptest.NewRecorder()
s.mux.ServeHTTP(resp, req)
assert.Equal(t, http.StatusNoContent, resp.Code)
})
t.Run("health check with http status 500", func(t *testing.T) {
s := newServer("", nil)
err := s.AddHealthCheckHandler("/", func(ctx context.Context) (err error) {
fmt.Println("hello,owrl")
return errors.New("app is unhealthy")
})
assert.NoError(t, err)
req, err := http.NewRequest(http.MethodGet, "/", nil)
assert.NoErrorf(t, err, "error creating request")
req.Header.Set("Content-Type", "application/json")
resp := httptest.NewRecorder()
s.mux.ServeHTTP(resp, req)
assert.Equal(t, http.StatusInternalServerError, resp.Code)
})
}