pb

package
v0.0.0-...-1472157 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TransistorService_Command_FullMethodName   = "/transistor.v1.TransistorService/Command"
	TransistorService_Publish_FullMethodName   = "/transistor.v1.TransistorService/Publish"
	TransistorService_Subscribe_FullMethodName = "/transistor.v1.TransistorService/Subscribe"
)

Variables

View Source
var (
	Method_name = map[int32]string{
		0: "METHOD_UNSPECIFIED",
		1: "METHOD_EMPTY",
		2: "METHOD_CREATE",
		3: "METHOD_UPDATE",
		4: "METHOD_DELETE",
	}
	Method_value = map[string]int32{
		"METHOD_UNSPECIFIED": 0,
		"METHOD_EMPTY":       1,
		"METHOD_CREATE":      2,
		"METHOD_UPDATE":      3,
		"METHOD_DELETE":      4,
	}
)

Enum value maps for Method.

View Source
var (
	Mode_name = map[int32]string{
		0: "MODE_UNSPECIFIED",
		1: "MODE_ANY",
		2: "MODE_ROUTE",
		3: "MODE_ROOT",
	}
	Mode_value = map[string]int32{
		"MODE_UNSPECIFIED": 0,
		"MODE_ANY":         1,
		"MODE_ROUTE":       2,
		"MODE_ROOT":        3,
	}
)

Enum value maps for Mode.

View Source
var (
	Operation_name = map[int32]string{
		0: "OPERATION_UNSPECIFIED",
		1: "OPERATION_ADD",
		2: "OPERATION_DEL",
	}
	Operation_value = map[string]int32{
		"OPERATION_UNSPECIFIED": 0,
		"OPERATION_ADD":         1,
		"OPERATION_DEL":         2,
	}
)

Enum value maps for Operation.

View Source
var File_transistor_v1_transistor_proto protoreflect.FileDescriptor
View Source
var TransistorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "transistor.v1.TransistorService",
	HandlerType: (*TransistorServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Command",
			Handler:       _TransistorService_Command_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Publish",
			Handler:       _TransistorService_Publish_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Subscribe",
			Handler:       _TransistorService_Subscribe_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "transistor/v1/transistor.proto",
}

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

Functions

func RegisterTransistorServiceServer

func RegisterTransistorServiceServer(s grpc.ServiceRegistrar, srv TransistorServiceServer)

Types

type Change

type Change struct {
	Mode  Mode      `protobuf:"varint,1,opt,name=mode,proto3,enum=transistor.v1.Mode" json:"mode,omitempty"`
	Op    Operation `protobuf:"varint,2,opt,name=op,proto3,enum=transistor.v1.Operation" json:"op,omitempty"`
	Topic *Topic    `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
	// contains filtered or unexported fields
}

func (*Change) Descriptor deprecated

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

Deprecated: Use Change.ProtoReflect.Descriptor instead.

func (*Change) GetMode

func (x *Change) GetMode() Mode

func (*Change) GetOp

func (x *Change) GetOp() Operation

func (*Change) GetTopic

func (x *Change) GetTopic() *Topic

func (*Change) ProtoMessage

func (*Change) ProtoMessage()

func (*Change) ProtoReflect

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

func (*Change) Reset

func (x *Change) Reset()

func (*Change) String

func (x *Change) String() string

type CommandRequest

type CommandRequest struct {
	Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandRequest) Descriptor deprecated

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

Deprecated: Use CommandRequest.ProtoReflect.Descriptor instead.

func (*CommandRequest) GetArgs

func (x *CommandRequest) GetArgs() []string

func (*CommandRequest) ProtoMessage

func (*CommandRequest) ProtoMessage()

func (*CommandRequest) ProtoReflect

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

func (*CommandRequest) Reset

func (x *CommandRequest) Reset()

func (*CommandRequest) String

func (x *CommandRequest) String() string

type CommandResponse

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

func (*CommandResponse) Descriptor deprecated

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

Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.

func (*CommandResponse) GetLine

func (x *CommandResponse) GetLine() string

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) ProtoReflect

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

func (*CommandResponse) Reset

func (x *CommandResponse) Reset()

func (*CommandResponse) String

func (x *CommandResponse) String() string

type Message

type Message struct {
	Mode      Mode                   `protobuf:"varint,1,opt,name=mode,proto3,enum=transistor.v1.Mode" json:"mode,omitempty"`
	Topic     *Topic                 `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	Method    Method                 `protobuf:"varint,3,opt,name=method,proto3,enum=transistor.v1.Method" json:"method,omitempty"`
	Data      *anypb.Any             `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetData

func (x *Message) GetData() *anypb.Any

func (*Message) GetMethod

func (x *Message) GetMethod() Method

func (*Message) GetMode

func (x *Message) GetMode() Mode

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() *timestamppb.Timestamp

func (*Message) GetTopic

func (x *Message) GetTopic() *Topic

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Method

type Method int32
const (
	Method_METHOD_UNSPECIFIED Method = 0
	Method_METHOD_EMPTY       Method = 1
	Method_METHOD_CREATE      Method = 2
	Method_METHOD_UPDATE      Method = 3
	Method_METHOD_DELETE      Method = 4
)

func (Method) Descriptor

func (Method) Descriptor() protoreflect.EnumDescriptor

func (Method) Enum

func (x Method) Enum() *Method

func (Method) EnumDescriptor deprecated

func (Method) EnumDescriptor() ([]byte, []int)

Deprecated: Use Method.Descriptor instead.

func (Method) Number

func (x Method) Number() protoreflect.EnumNumber

func (Method) String

func (x Method) String() string

func (Method) Type

func (Method) Type() protoreflect.EnumType

type Mode

type Mode int32
const (
	Mode_MODE_UNSPECIFIED Mode = 0
	Mode_MODE_ANY         Mode = 1
	Mode_MODE_ROUTE       Mode = 2
	Mode_MODE_ROOT        Mode = 3
)

func (Mode) Descriptor

func (Mode) Descriptor() protoreflect.EnumDescriptor

func (Mode) Enum

func (x Mode) Enum() *Mode

func (Mode) EnumDescriptor deprecated

func (Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Mode.Descriptor instead.

func (Mode) Number

func (x Mode) Number() protoreflect.EnumNumber

func (Mode) String

func (x Mode) String() string

func (Mode) Type

func (Mode) Type() protoreflect.EnumType

type Operation

type Operation int32
const (
	Operation_OPERATION_UNSPECIFIED Operation = 0
	Operation_OPERATION_ADD         Operation = 1
	Operation_OPERATION_DEL         Operation = 2
)

func (Operation) Descriptor

func (Operation) Descriptor() protoreflect.EnumDescriptor

func (Operation) Enum

func (x Operation) Enum() *Operation

func (Operation) EnumDescriptor deprecated

func (Operation) EnumDescriptor() ([]byte, []int)

Deprecated: Use Operation.Descriptor instead.

func (Operation) Number

func (x Operation) Number() protoreflect.EnumNumber

func (Operation) String

func (x Operation) String() string

func (Operation) Type

type PublishRequest

type PublishRequest struct {
	Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*PublishRequest) Descriptor deprecated

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

Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.

func (*PublishRequest) GetMsg

func (x *PublishRequest) GetMsg() *Message

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) ProtoReflect

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

func (*PublishRequest) Reset

func (x *PublishRequest) Reset()

func (*PublishRequest) String

func (x *PublishRequest) String() string

type PublishResponse

type PublishResponse struct {
	Change []*Change `protobuf:"bytes,1,rep,name=change,proto3" json:"change,omitempty"`
	// contains filtered or unexported fields
}

func (*PublishResponse) Descriptor deprecated

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

Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.

func (*PublishResponse) GetChange

func (x *PublishResponse) GetChange() []*Change

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) ProtoReflect

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

func (*PublishResponse) Reset

func (x *PublishResponse) Reset()

func (*PublishResponse) String

func (x *PublishResponse) String() string

type SubscribeRequest

type SubscribeRequest struct {
	Change *Change `protobuf:"bytes,1,opt,name=change,proto3" json:"change,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetChange

func (x *SubscribeRequest) GetChange() *Change

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResponse

type SubscribeResponse struct {
	Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetMsg

func (x *SubscribeResponse) GetMsg() *Message

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type Topic

type Topic struct {
	Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*Topic) Descriptor deprecated

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

Deprecated: Use Topic.ProtoReflect.Descriptor instead.

func (*Topic) GetTokens

func (x *Topic) GetTokens() []string

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) ProtoReflect

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

func (*Topic) Reset

func (x *Topic) Reset()

func (*Topic) String

func (x *Topic) String() string

type TransistorServiceClient

type TransistorServiceClient interface {
	// Open a new command line interface
	Command(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (TransistorService_CommandClient, error)
	// Receive a stream from a non-cluster node
	Publish(ctx context.Context, opts ...grpc.CallOption) (TransistorService_PublishClient, error)
	// Receive a stream from both cluster/non-cluster nodes
	// Always the subscriber should approach to this server
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (TransistorService_SubscribeClient, error)
}

TransistorServiceClient is the client API for TransistorService 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 TransistorServiceServer

type TransistorServiceServer interface {
	// Open a new command line interface
	Command(*CommandRequest, TransistorService_CommandServer) error
	// Receive a stream from a non-cluster node
	Publish(TransistorService_PublishServer) error
	// Receive a stream from both cluster/non-cluster nodes
	// Always the subscriber should approach to this server
	Subscribe(TransistorService_SubscribeServer) error
	// contains filtered or unexported methods
}

TransistorServiceServer is the server API for TransistorService service. All implementations must embed UnimplementedTransistorServiceServer for forward compatibility

type TransistorService_CommandClient

type TransistorService_CommandClient interface {
	Recv() (*CommandResponse, error)
	grpc.ClientStream
}

type TransistorService_CommandServer

type TransistorService_CommandServer interface {
	Send(*CommandResponse) error
	grpc.ServerStream
}

type TransistorService_PublishClient

type TransistorService_PublishClient interface {
	Send(*PublishRequest) error
	CloseAndRecv() (*PublishResponse, error)
	grpc.ClientStream
}

type TransistorService_PublishServer

type TransistorService_PublishServer interface {
	SendAndClose(*PublishResponse) error
	Recv() (*PublishRequest, error)
	grpc.ServerStream
}

type TransistorService_SubscribeClient

type TransistorService_SubscribeClient interface {
	Send(*SubscribeRequest) error
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type TransistorService_SubscribeServer

type TransistorService_SubscribeServer interface {
	Send(*SubscribeResponse) error
	Recv() (*SubscribeRequest, error)
	grpc.ServerStream
}

type UnimplementedTransistorServiceServer

type UnimplementedTransistorServiceServer struct {
}

UnimplementedTransistorServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTransistorServiceServer) Command

func (UnimplementedTransistorServiceServer) Publish

func (UnimplementedTransistorServiceServer) Subscribe

type UnsafeTransistorServiceServer

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

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

Jump to

Keyboard shortcuts

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