notify

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_notify_proto protoreflect.FileDescriptor
View Source
var Notify_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notify.Notify",
	HandlerType: (*NotifyServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _Notify_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "notify.proto",
}

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

Functions

func RegisterNotifyServer

func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer)

Types

type Notification

type Notification struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

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

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetMessage

func (x *Notification) GetMessage() string

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

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

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

type NotifyClient

type NotifyClient interface {
	Subscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (Notify_SubscribeClient, error)
}

NotifyClient is the client API for Notify 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 NewNotifyClient

func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient

type NotifyServer

type NotifyServer interface {
	Subscribe(*Request, Notify_SubscribeServer) error
	// contains filtered or unexported methods
}

NotifyServer is the server API for Notify service. All implementations must embed UnimplementedNotifyServer for forward compatibility

type Notify_SubscribeClient

type Notify_SubscribeClient interface {
	Recv() (*Notification, error)
	grpc.ClientStream
}

type Notify_SubscribeServer

type Notify_SubscribeServer interface {
	Send(*Notification) error
	grpc.ServerStream
}

type Request

type Request struct {
	DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetDeviceId

func (x *Request) GetDeviceId() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type UnimplementedNotifyServer

type UnimplementedNotifyServer struct {
}

UnimplementedNotifyServer must be embedded to have forward compatible implementations.

func (UnimplementedNotifyServer) Subscribe

type UnsafeNotifyServer

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

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

Jump to

Keyboard shortcuts

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