Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_notify_proto protoreflect.FileDescriptor
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) GetDeviceId ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type UnimplementedNotifyServer ¶
type UnimplementedNotifyServer struct { }
UnimplementedNotifyServer must be embedded to have forward compatible implementations.
func (UnimplementedNotifyServer) Subscribe ¶
func (UnimplementedNotifyServer) Subscribe(*Request, Notify_SubscribeServer) error
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.