Documentation ¶
Index ¶
- Variables
- func RegisterNotifierServer(s *grpc.Server, srv NotifierServer)
- type Config
- type Empty
- type GRPCClient
- type GRPCServer
- 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 Notifier
- type NotifierClient
- type NotifierPlugin
- type NotifierServer
- type UnimplementedNotifierServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_notifier_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNotifierServer ¶
func RegisterNotifierServer(s *grpc.Server, 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 GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func (*GRPCClient) Notify ¶
func (m *GRPCClient) Notify(ctx context.Context, notification *Notification) (*Empty, error)
type GRPCServer ¶
type GRPCServer struct {
Impl Notifier
}
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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNotifierClient ¶
func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient
type NotifierPlugin ¶
type NotifierPlugin struct { // GRPCPlugin must still implement the Plugin interface plugin.Plugin // Concrete implementation, written in Go. This is only used for plugins // that are written in Go. Impl Notifier }
This is the implementation of plugin.NotifierPlugin so we can serve/consume this.
func (*NotifierPlugin) GRPCClient ¶
func (p *NotifierPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*NotifierPlugin) GRPCServer ¶
func (p *NotifierPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type NotifierServer ¶
type NotifierServer interface { Notify(context.Context, *Notification) (*Empty, error) Configure(context.Context, *Config) (*Empty, error) }
NotifierServer is the server API for Notifier service.
type UnimplementedNotifierServer ¶
type UnimplementedNotifierServer struct { }
UnimplementedNotifierServer can be embedded to have forward compatible implementations.
func (*UnimplementedNotifierServer) Notify ¶
func (*UnimplementedNotifierServer) Notify(context.Context, *Notification) (*Empty, error)
Click to show internal directories.
Click to hide internal directories.