events

package
v3.10.13 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_events_events_proto protoreflect.FileDescriptor
View Source
var Store_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "events.Store",
	HandlerType: (*StoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Read",
			Handler:    _Store_Read_Handler,
		},
		{
			MethodName: "Write",
			Handler:    _Store_Write_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/events/events.proto",
}

Store_ServiceDesc is the grpc.ServiceDesc for Store 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 Stream_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "events.Stream",
	HandlerType: (*StreamServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Publish",
			Handler:    _Stream_Publish_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Consume",
			Handler:       _Stream_Consume_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/events/events.proto",
}

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

Functions

func NewStoreEndpoints

func NewStoreEndpoints() []*api.Endpoint

func NewStreamEndpoints

func NewStreamEndpoints() []*api.Endpoint

func RegisterStoreHandler

func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error

func RegisterStoreServer

func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer)

func RegisterStreamHandler

func RegisterStreamHandler(s server.Server, hdlr StreamHandler, opts ...server.HandlerOption) error

func RegisterStreamServer

func RegisterStreamServer(s grpc.ServiceRegistrar, srv StreamServer)

Types

type AckRequest

type AckRequest struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Success bool   `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*AckRequest) Descriptor deprecated

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

Deprecated: Use AckRequest.ProtoReflect.Descriptor instead.

func (*AckRequest) GetId

func (x *AckRequest) GetId() string

func (*AckRequest) GetSuccess

func (x *AckRequest) GetSuccess() bool

func (*AckRequest) ProtoMessage

func (*AckRequest) ProtoMessage()

func (*AckRequest) ProtoReflect

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

func (*AckRequest) Reset

func (x *AckRequest) Reset()

func (*AckRequest) String

func (x *AckRequest) String() string

type ConsumeRequest

type ConsumeRequest struct {
	Group   string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Topic   string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	Offset  int64  `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	AutoAck bool   `protobuf:"varint,4,opt,name=auto_ack,json=autoAck,proto3" json:"auto_ack,omitempty"`
	// duration in nanoseconds
	AckWait    int64 `protobuf:"varint,5,opt,name=ack_wait,json=ackWait,proto3" json:"ack_wait,omitempty"`
	RetryLimit int64 `protobuf:"varint,6,opt,name=retry_limit,json=retryLimit,proto3" json:"retry_limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumeRequest) Descriptor deprecated

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

Deprecated: Use ConsumeRequest.ProtoReflect.Descriptor instead.

func (*ConsumeRequest) GetAckWait

func (x *ConsumeRequest) GetAckWait() int64

func (*ConsumeRequest) GetAutoAck

func (x *ConsumeRequest) GetAutoAck() bool

func (*ConsumeRequest) GetGroup

func (x *ConsumeRequest) GetGroup() string

func (*ConsumeRequest) GetOffset

func (x *ConsumeRequest) GetOffset() int64

func (*ConsumeRequest) GetRetryLimit

func (x *ConsumeRequest) GetRetryLimit() int64

func (*ConsumeRequest) GetTopic

func (x *ConsumeRequest) GetTopic() string

func (*ConsumeRequest) ProtoMessage

func (*ConsumeRequest) ProtoMessage()

func (*ConsumeRequest) ProtoReflect

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

func (*ConsumeRequest) Reset

func (x *ConsumeRequest) Reset()

func (*ConsumeRequest) String

func (x *ConsumeRequest) String() string

type Event

type Event struct {
	Id        string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Topic     string            `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	Metadata  map[string]string `` /* 157-byte string literal not displayed */
	Payload   []byte            `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	Timestamp int64             `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetMetadata

func (x *Event) GetMetadata() map[string]string

func (*Event) GetPayload

func (x *Event) GetPayload() []byte

func (*Event) GetTimestamp

func (x *Event) GetTimestamp() int64

func (*Event) GetTopic

func (x *Event) GetTopic() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type PublishRequest

type PublishRequest struct {
	Topic     string            `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Metadata  map[string]string `` /* 157-byte string literal not displayed */
	Payload   []byte            `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Timestamp int64             `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*PublishRequest) Descriptor deprecated

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

Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.

func (*PublishRequest) GetMetadata

func (x *PublishRequest) GetMetadata() map[string]string

func (*PublishRequest) GetPayload

func (x *PublishRequest) GetPayload() []byte

func (*PublishRequest) GetTimestamp

func (x *PublishRequest) GetTimestamp() int64

func (*PublishRequest) GetTopic

func (x *PublishRequest) GetTopic() string

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 {
	// contains filtered or unexported fields
}

func (*PublishResponse) Descriptor deprecated

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

Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.

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 ReadRequest

type ReadRequest struct {
	Topic  string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Limit  uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetLimit

func (x *ReadRequest) GetLimit() uint64

func (*ReadRequest) GetOffset

func (x *ReadRequest) GetOffset() uint64

func (*ReadRequest) GetTopic

func (x *ReadRequest) GetTopic() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetEvents

func (x *ReadResponse) GetEvents() []*Event

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

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

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type StoreClient

type StoreClient interface {
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
}

StoreClient is the client API for Store 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 NewStoreClient

func NewStoreClient(cc grpc.ClientConnInterface) StoreClient

type StoreHandler

type StoreHandler interface {
	Read(context.Context, *ReadRequest, *ReadResponse) error
	Write(context.Context, *WriteRequest, *WriteResponse) error
}

type StoreServer

type StoreServer interface {
	Read(context.Context, *ReadRequest) (*ReadResponse, error)
	Write(context.Context, *WriteRequest) (*WriteResponse, error)
	// contains filtered or unexported methods
}

StoreServer is the server API for Store service. All implementations must embed UnimplementedStoreServer for forward compatibility

type StoreService

type StoreService interface {
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
}

func NewStoreService

func NewStoreService(name string, c client.Client) StoreService

type StreamClient

type StreamClient interface {
	Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
	Consume(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (Stream_ConsumeClient, error)
}

StreamClient is the client API for Stream 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 NewStreamClient

func NewStreamClient(cc grpc.ClientConnInterface) StreamClient

type StreamServer

type StreamServer interface {
	Publish(context.Context, *PublishRequest) (*PublishResponse, error)
	Consume(*ConsumeRequest, Stream_ConsumeServer) error
	// contains filtered or unexported methods
}

StreamServer is the server API for Stream service. All implementations must embed UnimplementedStreamServer for forward compatibility

type StreamService

type StreamService interface {
	Publish(ctx context.Context, in *PublishRequest, opts ...client.CallOption) (*PublishResponse, error)
	Consume(ctx context.Context, in *ConsumeRequest, opts ...client.CallOption) (Stream_ConsumeService, error)
}

func NewStreamService

func NewStreamService(name string, c client.Client) StreamService

type Stream_ConsumeClient

type Stream_ConsumeClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type Stream_ConsumeServer

type Stream_ConsumeServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type Stream_ConsumeService

type Stream_ConsumeService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*Event, error)
}

type Stream_ConsumeStream

type Stream_ConsumeStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Event) error
}

type UnimplementedStoreServer

type UnimplementedStoreServer struct {
}

UnimplementedStoreServer must be embedded to have forward compatible implementations.

func (UnimplementedStoreServer) Read

func (UnimplementedStoreServer) Write

type UnimplementedStreamServer

type UnimplementedStreamServer struct {
}

UnimplementedStreamServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamServer) Consume

func (UnimplementedStreamServer) Publish

type UnsafeStoreServer added in v3.10.4

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

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

type UnsafeStreamServer added in v3.10.4

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

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

type WriteRequest

type WriteRequest struct {
	Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	Ttl   int64  `protobuf:"varint,2,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetEvent

func (x *WriteRequest) GetEvent() *Event

func (*WriteRequest) GetTtl

func (x *WriteRequest) GetTtl() int64

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

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

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

type WriteResponse

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

func (*WriteResponse) Descriptor deprecated

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

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

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

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Jump to

Keyboard shortcuts

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