ctrlrpc

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UrlConfKey            = "externUrl"
	AddressConfKey        = "address"
	GcScanPeriodKey       = "gcPeriod"
	GcCollectThresholdKey = "gcThreshold"
)

Variables

View Source
var ControlEndpoint_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ctrlrpc.ControlEndpoint",
	HandlerType: (*ControlEndpointServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetConfig",
			Handler:    _ControlEndpoint_SetConfig_Handler,
		},
		{
			MethodName: "GetConfig",
			Handler:    _ControlEndpoint_GetConfig_Handler,
		},
		{
			MethodName: "ListSub",
			Handler:    _ControlEndpoint_ListSub_Handler,
		},
		{
			MethodName: "EditSub",
			Handler:    _ControlEndpoint_EditSub_Handler,
		},
		{
			MethodName: "RemoveSub",
			Handler:    _ControlEndpoint_RemoveSub_Handler,
		},
		{
			MethodName: "GC",
			Handler:    _ControlEndpoint_GC_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetErrors",
			Handler:       _ControlEndpoint_GetErrors_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "ctrlrpc/ctrl_message.proto",
}

ControlEndpoint_ServiceDesc is the grpc.ServiceDesc for ControlEndpoint service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_ctrlrpc_ctrl_message_proto protoreflect.FileDescriptor

Functions

func DecodeAWSCred

func DecodeAWSCred(s string) (awsId, awsSecret string, err error)

func EncodeAWSCred

func EncodeAWSCred(awsId, awsSecret string) string

func RegisterControlEndpointServer

func RegisterControlEndpointServer(s grpc.ServiceRegistrar, srv ControlEndpointServer)

Types

type Config

type Config struct {
	Keyvals map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetKeyvals

func (x *Config) GetKeyvals() map[string]string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type ControlEndpointClient

type ControlEndpointClient interface {
	SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*SetConfigResult, error)
	GetConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Config, error)
	ListSub(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*Subscriptions, error)
	EditSub(ctx context.Context, in *EditSubRequest, opts ...grpc.CallOption) (*Result, error)
	RemoveSub(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*Result, error)
	GetErrors(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (ControlEndpoint_GetErrorsClient, error)
	GC(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Result, error)
}

ControlEndpointClient is the client API for ControlEndpoint 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 ControlEndpointServer

type ControlEndpointServer interface {
	SetConfig(context.Context, *Config) (*SetConfigResult, error)
	GetConfig(context.Context, *empty.Empty) (*Config, error)
	ListSub(context.Context, *wrappers.StringValue) (*Subscriptions, error)
	EditSub(context.Context, *EditSubRequest) (*Result, error)
	RemoveSub(context.Context, *wrappers.StringValue) (*Result, error)
	GetErrors(*wrappers.StringValue, ControlEndpoint_GetErrorsServer) error
	GC(context.Context, *empty.Empty) (*Result, error)
	// contains filtered or unexported methods
}

ControlEndpointServer is the server API for ControlEndpoint service. All implementations must embed UnimplementedControlEndpointServer for forward compatibility

type ControlEndpoint_GetErrorsClient

type ControlEndpoint_GetErrorsClient interface {
	Recv() (*DeliveryError, error)
	grpc.ClientStream
}

type ControlEndpoint_GetErrorsServer

type ControlEndpoint_GetErrorsServer interface {
	Send(*DeliveryError) error
	grpc.ServerStream
}

type DeliveryError

type DeliveryError struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ErrorString string `protobuf:"bytes,2,opt,name=error_string,json=errorString,proto3" json:"error_string,omitempty"`
	// contains filtered or unexported fields
}

func (*DeliveryError) Descriptor deprecated

func (*DeliveryError) Descriptor() ([]byte, []int)

Deprecated: Use DeliveryError.ProtoReflect.Descriptor instead.

func (*DeliveryError) GetErrorString

func (x *DeliveryError) GetErrorString() string

func (*DeliveryError) GetId

func (x *DeliveryError) GetId() string

func (*DeliveryError) ProtoMessage

func (*DeliveryError) ProtoMessage()

func (*DeliveryError) ProtoReflect

func (x *DeliveryError) ProtoReflect() protoreflect.Message

func (*DeliveryError) Reset

func (x *DeliveryError) Reset()

func (*DeliveryError) String

func (x *DeliveryError) String() string

type EditSubRequest

type EditSubRequest struct {
	TopicArn         string `protobuf:"bytes,2,opt,name=topic_arn,json=topicArn,proto3" json:"topic_arn,omitempty"`
	AwsCred          string `protobuf:"bytes,3,opt,name=aws_cred,json=awsCred,proto3" json:"aws_cred,omitempty"`
	DeliveryTemplate string `protobuf:"bytes,4,opt,name=delivery_template,json=deliveryTemplate,proto3" json:"delivery_template,omitempty"`
	// contains filtered or unexported fields
}

func (*EditSubRequest) Descriptor deprecated

func (*EditSubRequest) Descriptor() ([]byte, []int)

Deprecated: Use EditSubRequest.ProtoReflect.Descriptor instead.

func (*EditSubRequest) GetAwsCred

func (x *EditSubRequest) GetAwsCred() string

func (*EditSubRequest) GetDeliveryTemplate

func (x *EditSubRequest) GetDeliveryTemplate() string

func (*EditSubRequest) GetTopicArn

func (x *EditSubRequest) GetTopicArn() string

func (*EditSubRequest) ProtoMessage

func (*EditSubRequest) ProtoMessage()

func (*EditSubRequest) ProtoReflect

func (x *EditSubRequest) ProtoReflect() protoreflect.Message

func (*EditSubRequest) Reset

func (x *EditSubRequest) Reset()

func (*EditSubRequest) String

func (x *EditSubRequest) String() string

type Result

type Result struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type SetConfigResult

type SetConfigResult struct {
	Changes         []string `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"`
	RestartRequired bool     `protobuf:"varint,2,opt,name=restart_required,json=restartRequired,proto3" json:"restart_required,omitempty"`
	// contains filtered or unexported fields
}

func (*SetConfigResult) Descriptor deprecated

func (*SetConfigResult) Descriptor() ([]byte, []int)

Deprecated: Use SetConfigResult.ProtoReflect.Descriptor instead.

func (*SetConfigResult) GetChanges

func (x *SetConfigResult) GetChanges() []string

func (*SetConfigResult) GetRestartRequired

func (x *SetConfigResult) GetRestartRequired() bool

func (*SetConfigResult) ProtoMessage

func (*SetConfigResult) ProtoMessage()

func (*SetConfigResult) ProtoReflect

func (x *SetConfigResult) ProtoReflect() protoreflect.Message

func (*SetConfigResult) Reset

func (x *SetConfigResult) Reset()

func (*SetConfigResult) String

func (x *SetConfigResult) String() string

type Subscription

type Subscription struct {
	SubArn string `protobuf:"bytes,1,opt,name=sub_arn,json=subArn,proto3" json:"sub_arn,omitempty"`
	// contains filtered or unexported fields
}

func (*Subscription) Descriptor deprecated

func (*Subscription) Descriptor() ([]byte, []int)

Deprecated: Use Subscription.ProtoReflect.Descriptor instead.

func (*Subscription) GetSubArn

func (x *Subscription) GetSubArn() string

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) ProtoReflect

func (x *Subscription) ProtoReflect() protoreflect.Message

func (*Subscription) Reset

func (x *Subscription) Reset()

func (*Subscription) String

func (x *Subscription) String() string

type Subscriptions

type Subscriptions struct {
	Values map[string]*Subscription `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Subscriptions) Descriptor deprecated

func (*Subscriptions) Descriptor() ([]byte, []int)

Deprecated: Use Subscriptions.ProtoReflect.Descriptor instead.

func (*Subscriptions) GetValues

func (x *Subscriptions) GetValues() map[string]*Subscription

func (*Subscriptions) ProtoMessage

func (*Subscriptions) ProtoMessage()

func (*Subscriptions) ProtoReflect

func (x *Subscriptions) ProtoReflect() protoreflect.Message

func (*Subscriptions) Reset

func (x *Subscriptions) Reset()

func (*Subscriptions) String

func (x *Subscriptions) String() string

type UnimplementedControlEndpointServer

type UnimplementedControlEndpointServer struct {
}

UnimplementedControlEndpointServer must be embedded to have forward compatible implementations.

func (UnimplementedControlEndpointServer) EditSub

func (UnimplementedControlEndpointServer) GC

func (UnimplementedControlEndpointServer) GetConfig

func (UnimplementedControlEndpointServer) GetErrors

func (UnimplementedControlEndpointServer) ListSub

func (UnimplementedControlEndpointServer) RemoveSub

func (UnimplementedControlEndpointServer) SetConfig

type UnsafeControlEndpointServer

type UnsafeControlEndpointServer interface {
	// contains filtered or unexported methods
}

UnsafeControlEndpointServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ControlEndpointServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL