Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNotifierServer(s grpc.ServiceRegistrar, srv NotifierServer)
- type Config
- type Empty
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)deprecated
- func (x *Notification) GetName() string
- func (x *Notification) GetText() string
- func (*Notification) ProtoMessage()
- func (x *Notification) ProtoReflect() protoreflect.Message
- func (x *Notification) Reset()
- func (x *Notification) String() string
- type NotifierClient
- type NotifierServer
- type UnimplementedNotifierServer
- type UnsafeNotifierServer
Constants ¶
const ( Notifier_Notify_FullMethodName = "/proto.Notifier/Notify" Notifier_Configure_FullMethodName = "/proto.Notifier/Configure" )
Variables ¶
var File_notifier_proto protoreflect.FileDescriptor
var Notifier_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Notifier", HandlerType: (*NotifierServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Notify", Handler: _Notifier_Notify_Handler, }, { MethodName: "Configure", Handler: _Notifier_Configure_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "notifier.proto", }
Notifier_ServiceDesc is the grpc.ServiceDesc for Notifier service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNotifierServer ¶
func RegisterNotifierServer(s grpc.ServiceRegistrar, srv NotifierServer)
Types ¶
type Config ¶
type Config struct { Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Notification ¶
type Notification struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Notification) Descriptor
deprecated
func (*Notification) Descriptor() ([]byte, []int)
Deprecated: Use Notification.ProtoReflect.Descriptor instead.
func (*Notification) GetName ¶
func (x *Notification) GetName() string
func (*Notification) GetText ¶
func (x *Notification) GetText() 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 NotifierClient ¶
type NotifierClient interface { Notify(ctx context.Context, in *Notification, opts ...grpc.CallOption) (*Empty, error) Configure(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Empty, error) }
NotifierClient is the client API for Notifier 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 NewNotifierClient ¶
func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient
type NotifierServer ¶
type NotifierServer interface { Notify(context.Context, *Notification) (*Empty, error) Configure(context.Context, *Config) (*Empty, error) // contains filtered or unexported methods }
NotifierServer is the server API for Notifier service. All implementations must embed UnimplementedNotifierServer for forward compatibility.
type UnimplementedNotifierServer ¶
type UnimplementedNotifierServer struct{}
UnimplementedNotifierServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNotifierServer) Notify ¶
func (UnimplementedNotifierServer) Notify(context.Context, *Notification) (*Empty, error)
type UnsafeNotifierServer ¶
type UnsafeNotifierServer interface {
// contains filtered or unexported methods
}
UnsafeNotifierServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotifierServer will result in compilation errors.