gogrpc

package module
v0.0.0-...-8fb0621 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MPL-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_connectorCommand_proto protoreflect.FileDescriptor
View Source
var File_connectorEvent_proto protoreflect.FileDescriptor
View Source
var File_connector_proto protoreflect.FileDescriptor

Functions

func CommandFromGrpc

func CommandFromGrpc(commandMessage *CommandMessage) (c msg.Command)

CommandMessageFromGrpc :

func EventFromGrpc

func EventFromGrpc(eventMessage *EventMessage) (e msg.Event)

EventMessageFromGrpc :

func RegisterConnectorCommandServer

func RegisterConnectorCommandServer(s *grpc.Server, srv ConnectorCommandServer)

func RegisterConnectorEventServer

func RegisterConnectorEventServer(s *grpc.Server, srv ConnectorEventServer)

func RegisterConnectorServer

func RegisterConnectorServer(s *grpc.Server, srv ConnectorServer)

Types

type CommandList

type CommandList struct {
	Major    int64    `protobuf:"varint,1,opt,name=Major,proto3" json:"Major,omitempty"`
	Minor    int64    `protobuf:"varint,2,opt,name=Minor,proto3" json:"Minor,omitempty"`
	Commands []string `protobuf:"bytes,3,rep,name=Commands,proto3" json:"Commands,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandList) Descriptor deprecated

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

Deprecated: Use CommandList.ProtoReflect.Descriptor instead.

func (*CommandList) GetCommands

func (x *CommandList) GetCommands() []string

func (*CommandList) GetMajor

func (x *CommandList) GetMajor() int64

func (*CommandList) GetMinor

func (x *CommandList) GetMinor() int64

func (*CommandList) ProtoMessage

func (*CommandList) ProtoMessage()

func (*CommandList) ProtoReflect

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

func (*CommandList) Reset

func (x *CommandList) Reset()

func (*CommandList) String

func (x *CommandList) String() string

type CommandMessage

type CommandMessage struct {
	SourceAggregator      string `protobuf:"bytes,1,opt,name=SourceAggregator,proto3" json:"SourceAggregator,omitempty"`
	SourceConnector       string `protobuf:"bytes,2,opt,name=SourceConnector,proto3" json:"SourceConnector,omitempty"`
	SourceWorker          string `protobuf:"bytes,3,opt,name=SourceWorker,proto3" json:"SourceWorker,omitempty"`
	DestinationAggregator string `protobuf:"bytes,4,opt,name=DestinationAggregator,proto3" json:"DestinationAggregator,omitempty"`
	DestinationConnector  string `protobuf:"bytes,5,opt,name=DestinationConnector,proto3" json:"DestinationConnector,omitempty"`
	DestinationWorker     string `protobuf:"bytes,6,opt,name=DestinationWorker,proto3" json:"DestinationWorker,omitempty"`
	Tenant                string `protobuf:"bytes,7,opt,name=Tenant,proto3" json:"Tenant,omitempty"`
	Token                 string `protobuf:"bytes,8,opt,name=Token,proto3" json:"Token,omitempty"`
	Context               string `protobuf:"bytes,9,opt,name=Context,proto3" json:"Context,omitempty"`
	Timeout               string `protobuf:"bytes,10,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	Timestamp             string `protobuf:"bytes,11,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Major                 int64  `protobuf:"varint,12,opt,name=Major,proto3" json:"Major,omitempty"`
	UUID                  string `protobuf:"bytes,13,opt,name=UUID,proto3" json:"UUID,omitempty"`
	ConnectorType         string `protobuf:"bytes,14,opt,name=ConnectorType,proto3" json:"ConnectorType,omitempty"`
	CommandType           string `protobuf:"bytes,15,opt,name=CommandType,proto3" json:"CommandType,omitempty"`
	Command               string `protobuf:"bytes,16,opt,name=Command,proto3" json:"Command,omitempty"`
	Payload               string `protobuf:"bytes,17,opt,name=Payload,proto3" json:"Payload,omitempty"`
	Admin                 bool   `protobuf:"varint,18,opt,name=Admin,proto3" json:"Admin,omitempty"`
	// contains filtered or unexported fields
}

func CommandToGrpc

func CommandToGrpc(c msg.Command) (commandMessage *CommandMessage)

CommandMessageToGrpc :

func (*CommandMessage) Descriptor deprecated

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

Deprecated: Use CommandMessage.ProtoReflect.Descriptor instead.

func (*CommandMessage) GetAdmin

func (x *CommandMessage) GetAdmin() bool

func (*CommandMessage) GetCommand

func (x *CommandMessage) GetCommand() string

func (*CommandMessage) GetCommandType

func (x *CommandMessage) GetCommandType() string

func (*CommandMessage) GetConnectorType

func (x *CommandMessage) GetConnectorType() string

func (*CommandMessage) GetContext

func (x *CommandMessage) GetContext() string

func (*CommandMessage) GetDestinationAggregator

func (x *CommandMessage) GetDestinationAggregator() string

func (*CommandMessage) GetDestinationConnector

func (x *CommandMessage) GetDestinationConnector() string

func (*CommandMessage) GetDestinationWorker

func (x *CommandMessage) GetDestinationWorker() string

func (*CommandMessage) GetMajor

func (x *CommandMessage) GetMajor() int64

func (*CommandMessage) GetPayload

func (x *CommandMessage) GetPayload() string

func (*CommandMessage) GetSourceAggregator

func (x *CommandMessage) GetSourceAggregator() string

func (*CommandMessage) GetSourceConnector

func (x *CommandMessage) GetSourceConnector() string

func (*CommandMessage) GetSourceWorker

func (x *CommandMessage) GetSourceWorker() string

func (*CommandMessage) GetTenant

func (x *CommandMessage) GetTenant() string

func (*CommandMessage) GetTimeout

func (x *CommandMessage) GetTimeout() string

func (*CommandMessage) GetTimestamp

func (x *CommandMessage) GetTimestamp() string

func (*CommandMessage) GetToken

func (x *CommandMessage) GetToken() string

func (*CommandMessage) GetUUID

func (x *CommandMessage) GetUUID() string

func (*CommandMessage) ProtoMessage

func (*CommandMessage) ProtoMessage()

func (*CommandMessage) ProtoReflect

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

func (*CommandMessage) Reset

func (x *CommandMessage) Reset()

func (*CommandMessage) String

func (x *CommandMessage) String() string

type CommandMessageUUID

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

func (*CommandMessageUUID) Descriptor deprecated

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

Deprecated: Use CommandMessageUUID.ProtoReflect.Descriptor instead.

func (*CommandMessageUUID) GetUUID

func (x *CommandMessageUUID) GetUUID() string

func (*CommandMessageUUID) ProtoMessage

func (*CommandMessageUUID) ProtoMessage()

func (*CommandMessageUUID) ProtoReflect

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

func (*CommandMessageUUID) Reset

func (x *CommandMessageUUID) Reset()

func (*CommandMessageUUID) String

func (x *CommandMessageUUID) String() string

type CommandMessageWait

type CommandMessageWait struct {
	WorkerSource string `protobuf:"bytes,1,opt,name=WorkerSource,proto3" json:"WorkerSource,omitempty"`
	Value        string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
	IteratorId   string `protobuf:"bytes,3,opt,name=IteratorId,proto3" json:"IteratorId,omitempty"`
	Major        int64  `protobuf:"varint,4,opt,name=Major,proto3" json:"Major,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandMessageWait) Descriptor deprecated

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

Deprecated: Use CommandMessageWait.ProtoReflect.Descriptor instead.

func (*CommandMessageWait) GetIteratorId

func (x *CommandMessageWait) GetIteratorId() string

func (*CommandMessageWait) GetMajor

func (x *CommandMessageWait) GetMajor() int64

func (*CommandMessageWait) GetValue

func (x *CommandMessageWait) GetValue() string

func (*CommandMessageWait) GetWorkerSource

func (x *CommandMessageWait) GetWorkerSource() string

func (*CommandMessageWait) ProtoMessage

func (*CommandMessageWait) ProtoMessage()

func (*CommandMessageWait) ProtoReflect

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

func (*CommandMessageWait) Reset

func (x *CommandMessageWait) Reset()

func (*CommandMessageWait) String

func (x *CommandMessageWait) String() string

type ConnectorClient

type ConnectorClient interface {
	SendCommandList(ctx context.Context, in *CommandList, opts ...grpc.CallOption) (*Validate, error)
	SendStop(ctx context.Context, in *Stop, opts ...grpc.CallOption) (*Validate, error)
}

ConnectorClient is the client API for Connector 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.

func NewConnectorClient

func NewConnectorClient(cc grpc.ClientConnInterface) ConnectorClient

type ConnectorCommandClient

type ConnectorCommandClient interface {
	SendCommandMessage(ctx context.Context, in *CommandMessage, opts ...grpc.CallOption) (*CommandMessageUUID, error)
	WaitCommandMessage(ctx context.Context, in *CommandMessageWait, opts ...grpc.CallOption) (*CommandMessage, error)
	CreateIteratorCommand(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*IteratorMessage, error)
}

ConnectorCommandClient is the client API for ConnectorCommand 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 ConnectorCommandServer

type ConnectorCommandServer interface {
	SendCommandMessage(context.Context, *CommandMessage) (*CommandMessageUUID, error)
	WaitCommandMessage(context.Context, *CommandMessageWait) (*CommandMessage, error)
	CreateIteratorCommand(context.Context, *Empty) (*IteratorMessage, error)
	// contains filtered or unexported methods
}

ConnectorCommandServer is the server API for ConnectorCommand service. All implementations must embed UnimplementedConnectorCommandServer for forward compatibility

type ConnectorEventClient

type ConnectorEventClient interface {
	SendEventMessage(ctx context.Context, in *EventMessage, opts ...grpc.CallOption) (*Empty, error)
	WaitEventMessage(ctx context.Context, in *EventMessageWait, opts ...grpc.CallOption) (*EventMessage, error)
	WaitTopicMessage(ctx context.Context, in *TopicMessageWait, opts ...grpc.CallOption) (*EventMessage, error)
	CreateIteratorEvent(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*IteratorMessage, error)
}

ConnectorEventClient is the client API for ConnectorEvent 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 ConnectorEventServer

type ConnectorEventServer interface {
	SendEventMessage(context.Context, *EventMessage) (*Empty, error)
	WaitEventMessage(context.Context, *EventMessageWait) (*EventMessage, error)
	WaitTopicMessage(context.Context, *TopicMessageWait) (*EventMessage, error)
	CreateIteratorEvent(context.Context, *Empty) (*IteratorMessage, error)
	// contains filtered or unexported methods
}

ConnectorEventServer is the server API for ConnectorEvent service. All implementations must embed UnimplementedConnectorEventServer for forward compatibility

type ConnectorServer

type ConnectorServer interface {
	SendCommandList(context.Context, *CommandList) (*Validate, error)
	SendStop(context.Context, *Stop) (*Validate, error)
	// contains filtered or unexported methods
}

ConnectorServer is the server API for Connector service. All implementations must embed UnimplementedConnectorServer for forward compatibility

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type EventMessage

type EventMessage struct {
	Tenant        string `protobuf:"bytes,1,opt,name=Tenant,proto3" json:"Tenant,omitempty"`
	Token         string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"`
	Topic         string `protobuf:"bytes,3,opt,name=Topic,proto3" json:"Topic,omitempty"`
	Timeout       string `protobuf:"bytes,4,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	Timestamp     string `protobuf:"bytes,5,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	UUID          string `protobuf:"bytes,6,opt,name=UUID,proto3" json:"UUID,omitempty"`
	Event         string `protobuf:"bytes,7,opt,name=Event,proto3" json:"Event,omitempty"`
	Payload       string `protobuf:"bytes,8,opt,name=Payload,proto3" json:"Payload,omitempty"`
	ReferenceUUID string `protobuf:"bytes,9,opt,name=ReferenceUUID,proto3" json:"ReferenceUUID,omitempty"`
	// contains filtered or unexported fields
}

func EventToGrpc

func EventToGrpc(e msg.Event) (eventMessage *EventMessage)

EventMessageToGrpc :

func (*EventMessage) Descriptor deprecated

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

Deprecated: Use EventMessage.ProtoReflect.Descriptor instead.

func (*EventMessage) GetEvent

func (x *EventMessage) GetEvent() string

func (*EventMessage) GetPayload

func (x *EventMessage) GetPayload() string

func (*EventMessage) GetReferenceUUID

func (x *EventMessage) GetReferenceUUID() string

func (*EventMessage) GetTenant

func (x *EventMessage) GetTenant() string

func (*EventMessage) GetTimeout

func (x *EventMessage) GetTimeout() string

func (*EventMessage) GetTimestamp

func (x *EventMessage) GetTimestamp() string

func (*EventMessage) GetToken

func (x *EventMessage) GetToken() string

func (*EventMessage) GetTopic

func (x *EventMessage) GetTopic() string

func (*EventMessage) GetUUID

func (x *EventMessage) GetUUID() string

func (*EventMessage) ProtoMessage

func (*EventMessage) ProtoMessage()

func (*EventMessage) ProtoReflect

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

func (*EventMessage) Reset

func (x *EventMessage) Reset()

func (*EventMessage) String

func (x *EventMessage) String() string

type EventMessageWait

type EventMessageWait struct {
	WorkerSource  string `protobuf:"bytes,1,opt,name=WorkerSource,proto3" json:"WorkerSource,omitempty"`
	Event         string `protobuf:"bytes,2,opt,name=Event,proto3" json:"Event,omitempty"`
	Topic         string `protobuf:"bytes,3,opt,name=Topic,proto3" json:"Topic,omitempty"`
	IteratorId    string `protobuf:"bytes,4,opt,name=IteratorId,proto3" json:"IteratorId,omitempty"`
	ReferenceUUID string `protobuf:"bytes,5,opt,name=ReferenceUUID,proto3" json:"ReferenceUUID,omitempty"`
	// contains filtered or unexported fields
}

func (*EventMessageWait) Descriptor deprecated

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

Deprecated: Use EventMessageWait.ProtoReflect.Descriptor instead.

func (*EventMessageWait) GetEvent

func (x *EventMessageWait) GetEvent() string

func (*EventMessageWait) GetIteratorId

func (x *EventMessageWait) GetIteratorId() string

func (*EventMessageWait) GetReferenceUUID

func (x *EventMessageWait) GetReferenceUUID() string

func (*EventMessageWait) GetTopic

func (x *EventMessageWait) GetTopic() string

func (*EventMessageWait) GetWorkerSource

func (x *EventMessageWait) GetWorkerSource() string

func (*EventMessageWait) ProtoMessage

func (*EventMessageWait) ProtoMessage()

func (*EventMessageWait) ProtoReflect

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

func (*EventMessageWait) Reset

func (x *EventMessageWait) Reset()

func (*EventMessageWait) String

func (x *EventMessageWait) String() string

type IteratorMessage

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

func (*IteratorMessage) Descriptor deprecated

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

Deprecated: Use IteratorMessage.ProtoReflect.Descriptor instead.

func (*IteratorMessage) GetId

func (x *IteratorMessage) GetId() string

func (*IteratorMessage) ProtoMessage

func (*IteratorMessage) ProtoMessage()

func (*IteratorMessage) ProtoReflect

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

func (*IteratorMessage) Reset

func (x *IteratorMessage) Reset()

func (*IteratorMessage) String

func (x *IteratorMessage) String() string

type Stop

type Stop struct {
	Major int64 `protobuf:"varint,1,opt,name=Major,proto3" json:"Major,omitempty"`
	Minor int64 `protobuf:"varint,2,opt,name=Minor,proto3" json:"Minor,omitempty"`
	// contains filtered or unexported fields
}

func (*Stop) Descriptor deprecated

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

Deprecated: Use Stop.ProtoReflect.Descriptor instead.

func (*Stop) GetMajor

func (x *Stop) GetMajor() int64

func (*Stop) GetMinor

func (x *Stop) GetMinor() int64

func (*Stop) ProtoMessage

func (*Stop) ProtoMessage()

func (*Stop) ProtoReflect

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

func (*Stop) Reset

func (x *Stop) Reset()

func (*Stop) String

func (x *Stop) String() string

type TopicMessageWait

type TopicMessageWait struct {
	WorkerSource  string `protobuf:"bytes,1,opt,name=WorkerSource,proto3" json:"WorkerSource,omitempty"`
	Topic         string `protobuf:"bytes,2,opt,name=Topic,proto3" json:"Topic,omitempty"`
	IteratorId    string `protobuf:"bytes,3,opt,name=IteratorId,proto3" json:"IteratorId,omitempty"`
	ReferenceUUID string `protobuf:"bytes,4,opt,name=ReferenceUUID,proto3" json:"ReferenceUUID,omitempty"`
	// contains filtered or unexported fields
}

func (*TopicMessageWait) Descriptor deprecated

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

Deprecated: Use TopicMessageWait.ProtoReflect.Descriptor instead.

func (*TopicMessageWait) GetIteratorId

func (x *TopicMessageWait) GetIteratorId() string

func (*TopicMessageWait) GetReferenceUUID

func (x *TopicMessageWait) GetReferenceUUID() string

func (*TopicMessageWait) GetTopic

func (x *TopicMessageWait) GetTopic() string

func (*TopicMessageWait) GetWorkerSource

func (x *TopicMessageWait) GetWorkerSource() string

func (*TopicMessageWait) ProtoMessage

func (*TopicMessageWait) ProtoMessage()

func (*TopicMessageWait) ProtoReflect

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

func (*TopicMessageWait) Reset

func (x *TopicMessageWait) Reset()

func (*TopicMessageWait) String

func (x *TopicMessageWait) String() string

type UnimplementedConnectorCommandServer

type UnimplementedConnectorCommandServer struct {
}

UnimplementedConnectorCommandServer must be embedded to have forward compatible implementations.

func (UnimplementedConnectorCommandServer) CreateIteratorCommand

func (UnimplementedConnectorCommandServer) SendCommandMessage

func (UnimplementedConnectorCommandServer) WaitCommandMessage

type UnimplementedConnectorEventServer

type UnimplementedConnectorEventServer struct {
}

UnimplementedConnectorEventServer must be embedded to have forward compatible implementations.

func (UnimplementedConnectorEventServer) CreateIteratorEvent

func (UnimplementedConnectorEventServer) SendEventMessage

func (UnimplementedConnectorEventServer) WaitEventMessage

func (UnimplementedConnectorEventServer) WaitTopicMessage

type UnimplementedConnectorServer

type UnimplementedConnectorServer struct {
}

UnimplementedConnectorServer must be embedded to have forward compatible implementations.

func (UnimplementedConnectorServer) SendCommandList

func (UnimplementedConnectorServer) SendStop

type UnsafeConnectorCommandServer

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

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

type UnsafeConnectorEventServer

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

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

type UnsafeConnectorServer

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

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

type Validate

type Validate struct {
	Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	// contains filtered or unexported fields
}

func (*Validate) Descriptor deprecated

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

Deprecated: Use Validate.ProtoReflect.Descriptor instead.

func (*Validate) GetValid

func (x *Validate) GetValid() bool

func (*Validate) ProtoMessage

func (*Validate) ProtoMessage()

func (*Validate) ProtoReflect

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

func (*Validate) Reset

func (x *Validate) Reset()

func (*Validate) String

func (x *Validate) String() string

Jump to

Keyboard shortcuts

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