Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMercuriusServer(s grpc.ServiceRegistrar, srv MercuriusServer)
- type ACK
- type BulkEvent
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetBody() []byte
- func (x *Event) GetCreatedAt() *timestamppb.Timestamp
- func (x *Event) GetExpiresAt() uint32
- func (x *Event) GetId() string
- func (x *Event) GetTopic() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type MercuriusClient
- type MercuriusServer
- type Mercurius_SubscribeClient
- type Mercurius_SubscribeServer
- type RetryRequest
- func (*RetryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RetryRequest) GetCreatedAt() *timestamppb.Timestamp
- func (x *RetryRequest) GetEvent() *Event
- func (x *RetryRequest) GetSubscriberID() string
- func (*RetryRequest) ProtoMessage()
- func (x *RetryRequest) ProtoReflect() protoreflect.Message
- func (x *RetryRequest) Reset()
- func (x *RetryRequest) String() string
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetCreatedAt() *timestamppb.Timestamp
- func (x *SubscribeRequest) GetSubscriberID() string
- func (x *SubscribeRequest) GetSubscriberName() string
- func (x *SubscribeRequest) GetTopic() string
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type UnimplementedMercuriusServer
- type UnsafeMercuriusServer
Constants ¶
const ( Mercurius_Publish_FullMethodName = "/proto.Mercurius/Publish" Mercurius_Subscribe_FullMethodName = "/proto.Mercurius/Subscribe" Mercurius_Retry_FullMethodName = "/proto.Mercurius/Retry" )
Variables ¶
var File_Event_proto protoreflect.FileDescriptor
var Mercurius_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Mercurius", HandlerType: (*MercuriusServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Publish", Handler: _Mercurius_Publish_Handler, }, { MethodName: "Retry", Handler: _Mercurius_Retry_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Mercurius_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "Event.proto", }
Mercurius_ServiceDesc is the grpc.ServiceDesc for Mercurius service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMercuriusServer ¶
func RegisterMercuriusServer(s grpc.ServiceRegistrar, srv MercuriusServer)
Types ¶
type ACK ¶
type ACK struct {
// contains filtered or unexported fields
}
func (*ACK) Descriptor
deprecated
func (*ACK) ProtoMessage ¶
func (*ACK) ProtoMessage()
func (*ACK) ProtoReflect ¶
func (x *ACK) ProtoReflect() protoreflect.Message
type BulkEvent ¶
type BulkEvent struct { EventList []*Event `protobuf:"bytes,1,rep,name=eventList,proto3" json:"eventList,omitempty"` // contains filtered or unexported fields }
func (*BulkEvent) Descriptor
deprecated
func (*BulkEvent) GetEventList ¶
func (*BulkEvent) ProtoMessage ¶
func (*BulkEvent) ProtoMessage()
func (*BulkEvent) ProtoReflect ¶
func (x *BulkEvent) ProtoReflect() protoreflect.Message
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"` Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` ExpiresAt uint32 `protobuf:"varint,5,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetCreatedAt ¶
func (x *Event) GetCreatedAt() *timestamppb.Timestamp
func (*Event) GetExpiresAt ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type MercuriusClient ¶
type MercuriusClient interface { Publish(ctx context.Context, in *Event, opts ...grpc.CallOption) (*ACK, error) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Mercurius_SubscribeClient, error) Retry(ctx context.Context, in *RetryRequest, opts ...grpc.CallOption) (*ACK, error) }
MercuriusClient is the client API for Mercurius 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 NewMercuriusClient ¶
func NewMercuriusClient(cc grpc.ClientConnInterface) MercuriusClient
type MercuriusServer ¶
type MercuriusServer interface { Publish(context.Context, *Event) (*ACK, error) Subscribe(*SubscribeRequest, Mercurius_SubscribeServer) error Retry(context.Context, *RetryRequest) (*ACK, error) // contains filtered or unexported methods }
MercuriusServer is the server API for Mercurius service. All implementations must embed UnimplementedMercuriusServer for forward compatibility
type Mercurius_SubscribeClient ¶
type Mercurius_SubscribeClient interface { Recv() (*BulkEvent, error) grpc.ClientStream }
type Mercurius_SubscribeServer ¶
type Mercurius_SubscribeServer interface { Send(*BulkEvent) error grpc.ServerStream }
type RetryRequest ¶
type RetryRequest struct { SubscriberID string `protobuf:"bytes,1,opt,name=subscriberID,proto3" json:"subscriberID,omitempty"` Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*RetryRequest) Descriptor
deprecated
func (*RetryRequest) Descriptor() ([]byte, []int)
Deprecated: Use RetryRequest.ProtoReflect.Descriptor instead.
func (*RetryRequest) GetCreatedAt ¶
func (x *RetryRequest) GetCreatedAt() *timestamppb.Timestamp
func (*RetryRequest) GetEvent ¶
func (x *RetryRequest) GetEvent() *Event
func (*RetryRequest) GetSubscriberID ¶
func (x *RetryRequest) GetSubscriberID() string
func (*RetryRequest) ProtoMessage ¶
func (*RetryRequest) ProtoMessage()
func (*RetryRequest) ProtoReflect ¶
func (x *RetryRequest) ProtoReflect() protoreflect.Message
func (*RetryRequest) Reset ¶
func (x *RetryRequest) Reset()
func (*RetryRequest) String ¶
func (x *RetryRequest) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { SubscriberID string `protobuf:"bytes,1,opt,name=subscriberID,proto3" json:"subscriberID,omitempty"` SubscriberName string `protobuf:"bytes,2,opt,name=subscriberName,proto3" json:"subscriberName,omitempty"` Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetCreatedAt ¶
func (x *SubscribeRequest) GetCreatedAt() *timestamppb.Timestamp
func (*SubscribeRequest) GetSubscriberID ¶
func (x *SubscribeRequest) GetSubscriberID() string
func (*SubscribeRequest) GetSubscriberName ¶
func (x *SubscribeRequest) GetSubscriberName() string
func (*SubscribeRequest) GetTopic ¶
func (x *SubscribeRequest) GetTopic() string
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 UnimplementedMercuriusServer ¶
type UnimplementedMercuriusServer struct { }
UnimplementedMercuriusServer must be embedded to have forward compatible implementations.
func (UnimplementedMercuriusServer) Retry ¶
func (UnimplementedMercuriusServer) Retry(context.Context, *RetryRequest) (*ACK, error)
func (UnimplementedMercuriusServer) Subscribe ¶
func (UnimplementedMercuriusServer) Subscribe(*SubscribeRequest, Mercurius_SubscribeServer) error
type UnsafeMercuriusServer ¶
type UnsafeMercuriusServer interface {
// contains filtered or unexported methods
}
UnsafeMercuriusServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MercuriusServer will result in compilation errors.