events

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 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

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.Server, srv StoreServer)

func RegisterStreamHandler

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

func RegisterStreamServer

func RegisterStreamServer(s *grpc.Server, 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 added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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://godoc.org/google.golang.org/grpc#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)
}

StoreServer is the server API for Store service.

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://godoc.org/google.golang.org/grpc#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
}

StreamServer is the server API for Stream service.

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 added in v3.8.3

type UnimplementedStoreServer struct {
}

UnimplementedStoreServer can be embedded to have forward compatible implementations.

func (*UnimplementedStoreServer) Read added in v3.8.3

func (*UnimplementedStoreServer) Write added in v3.8.3

type UnimplementedStreamServer added in v3.8.3

type UnimplementedStreamServer struct {
}

UnimplementedStreamServer can be embedded to have forward compatible implementations.

func (*UnimplementedStreamServer) Consume added in v3.8.3

func (*UnimplementedStreamServer) Publish added in v3.8.3

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 added in v3.8.3

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 added in v3.8.3

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