proto

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_notification_proto protoreflect.FileDescriptor
View Source
var NotifierService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notifierserver.NotifierService",
	HandlerType: (*NotifierServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unsubscribe",
			Handler:    _NotifierService_Unsubscribe_Handler,
		},
		{
			MethodName: "Broadcast",
			Handler:    _NotifierService_Broadcast_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _NotifierService_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "notification.proto",
}

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

Functions

func RegisterNotifierServiceServer

func RegisterNotifierServiceServer(s grpc.ServiceRegistrar, srv NotifierServiceServer)

Types

type NotificationData

type NotificationData 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"`
	Message   string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*NotificationData) Descriptor deprecated

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

Deprecated: Use NotificationData.ProtoReflect.Descriptor instead.

func (*NotificationData) GetId

func (x *NotificationData) GetId() string

func (*NotificationData) GetMessage

func (x *NotificationData) GetMessage() string

func (*NotificationData) GetTimestamp

func (x *NotificationData) GetTimestamp() string

func (*NotificationData) GetTopic

func (x *NotificationData) GetTopic() string

func (*NotificationData) ProtoMessage

func (*NotificationData) ProtoMessage()

func (*NotificationData) ProtoReflect

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

func (*NotificationData) Reset

func (x *NotificationData) Reset()

func (*NotificationData) String

func (x *NotificationData) String() string

type NotificationDone

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

func (*NotificationDone) Descriptor deprecated

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

Deprecated: Use NotificationDone.ProtoReflect.Descriptor instead.

func (*NotificationDone) ProtoMessage

func (*NotificationDone) ProtoMessage()

func (*NotificationDone) ProtoReflect

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

func (*NotificationDone) Reset

func (x *NotificationDone) Reset()

func (*NotificationDone) String

func (x *NotificationDone) String() string

type NotificationSubscriber

type NotificationSubscriber 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"`
	// contains filtered or unexported fields
}

func (*NotificationSubscriber) Descriptor deprecated

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

Deprecated: Use NotificationSubscriber.ProtoReflect.Descriptor instead.

func (*NotificationSubscriber) GetId

func (x *NotificationSubscriber) GetId() string

func (*NotificationSubscriber) GetTopic

func (x *NotificationSubscriber) GetTopic() string

func (*NotificationSubscriber) ProtoMessage

func (*NotificationSubscriber) ProtoMessage()

func (*NotificationSubscriber) ProtoReflect

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

func (*NotificationSubscriber) Reset

func (x *NotificationSubscriber) Reset()

func (*NotificationSubscriber) String

func (x *NotificationSubscriber) String() string

type NotifierServiceClient

type NotifierServiceClient interface {
	Subscribe(ctx context.Context, in *NotificationSubscriber, opts ...grpc.CallOption) (NotifierService_SubscribeClient, error)
	Unsubscribe(ctx context.Context, in *NotificationSubscriber, opts ...grpc.CallOption) (*NotificationDone, error)
	Broadcast(ctx context.Context, in *NotificationData, opts ...grpc.CallOption) (*NotificationDone, error)
}

NotifierServiceClient is the client API for NotifierService 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 NotifierServiceServer

type NotifierServiceServer interface {
	Subscribe(*NotificationSubscriber, NotifierService_SubscribeServer) error
	Unsubscribe(context.Context, *NotificationSubscriber) (*NotificationDone, error)
	Broadcast(context.Context, *NotificationData) (*NotificationDone, error)
	// contains filtered or unexported methods
}

NotifierServiceServer is the server API for NotifierService service. All implementations must embed UnimplementedNotifierServiceServer for forward compatibility

type NotifierService_SubscribeClient

type NotifierService_SubscribeClient interface {
	Recv() (*NotificationData, error)
	grpc.ClientStream
}

type NotifierService_SubscribeServer

type NotifierService_SubscribeServer interface {
	Send(*NotificationData) error
	grpc.ServerStream
}

type UnimplementedNotifierServiceServer

type UnimplementedNotifierServiceServer struct {
}

UnimplementedNotifierServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedNotifierServiceServer) Broadcast

func (UnimplementedNotifierServiceServer) Subscribe

func (UnimplementedNotifierServiceServer) Unsubscribe

type UnsafeNotifierServiceServer

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

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

Jump to

Keyboard shortcuts

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