proto

package
v0.0.0-...-e56df46 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mercurius_Publish_FullMethodName   = "/proto.Mercurius/Publish"
	Mercurius_Subscribe_FullMethodName = "/proto.Mercurius/Subscribe"
	Mercurius_Retry_FullMethodName     = "/proto.Mercurius/Retry"
)

Variables

View Source
var File_Event_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use ACK.ProtoReflect.Descriptor instead.

func (*ACK) ProtoMessage

func (*ACK) ProtoMessage()

func (*ACK) ProtoReflect

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

func (*ACK) Reset

func (x *ACK) Reset()

func (*ACK) String

func (x *ACK) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use BulkEvent.ProtoReflect.Descriptor instead.

func (*BulkEvent) GetEventList

func (x *BulkEvent) GetEventList() []*Event

func (*BulkEvent) ProtoMessage

func (*BulkEvent) ProtoMessage()

func (*BulkEvent) ProtoReflect

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

func (*BulkEvent) Reset

func (x *BulkEvent) Reset()

func (*BulkEvent) String

func (x *BulkEvent) 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"`
	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) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetBody

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

func (*Event) GetCreatedAt

func (x *Event) GetCreatedAt() *timestamppb.Timestamp

func (*Event) GetExpiresAt

func (x *Event) GetExpiresAt() uint32

func (*Event) GetId

func (x *Event) GetId() string

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 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) Publish

func (UnimplementedMercuriusServer) Retry

func (UnimplementedMercuriusServer) Subscribe

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.

Jump to

Keyboard shortcuts

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