Documentation
¶
Index ¶
- Variables
- func RegisterCacherServer(s *grpc.Server, srv CacherServer)
- type CacherClient
- type CacherServer
- type Cacher_AllClient
- type Cacher_AllServer
- type Cacher_WatchClient
- type Cacher_WatchServer
- type Empty
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetID() string
- func (x *GetRequest) GetIP() string
- func (x *GetRequest) GetMAC() string
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- type Hardware
- type PushRequest
- type UnimplementedCacherServer
- func (*UnimplementedCacherServer) All(*Empty, Cacher_AllServer) error
- func (*UnimplementedCacherServer) ByID(context.Context, *GetRequest) (*Hardware, error)
- func (*UnimplementedCacherServer) ByIP(context.Context, *GetRequest) (*Hardware, error)
- func (*UnimplementedCacherServer) ByMAC(context.Context, *GetRequest) (*Hardware, error)
- func (*UnimplementedCacherServer) Ingest(context.Context, *Empty) (*Empty, error)
- func (*UnimplementedCacherServer) Push(context.Context, *PushRequest) (*Empty, error)
- func (*UnimplementedCacherServer) Watch(*GetRequest, Cacher_WatchServer) error
Constants ¶
This section is empty.
Variables ¶
View Source
var File_cacher_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCacherServer ¶
func RegisterCacherServer(s *grpc.Server, srv CacherServer)
Types ¶
type CacherClient ¶
type CacherClient interface { Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Cacher_AllClient, error) Ingest(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) Watch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (Cacher_WatchClient, error) }
CacherClient is the client API for Cacher service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCacherClient ¶
func NewCacherClient(cc grpc.ClientConnInterface) CacherClient
type CacherServer ¶
type CacherServer interface { Push(context.Context, *PushRequest) (*Empty, error) ByMAC(context.Context, *GetRequest) (*Hardware, error) ByIP(context.Context, *GetRequest) (*Hardware, error) ByID(context.Context, *GetRequest) (*Hardware, error) All(*Empty, Cacher_AllServer) error Ingest(context.Context, *Empty) (*Empty, error) Watch(*GetRequest, Cacher_WatchServer) error }
CacherServer is the server API for Cacher service.
type Cacher_AllClient ¶
type Cacher_AllClient interface { Recv() (*Hardware, error) grpc.ClientStream }
type Cacher_AllServer ¶
type Cacher_AllServer interface { Send(*Hardware) error grpc.ServerStream }
type Cacher_WatchClient ¶
type Cacher_WatchClient interface { Recv() (*Hardware, error) grpc.ClientStream }
type Cacher_WatchServer ¶
type Cacher_WatchServer interface { Send(*Hardware) error grpc.ServerStream }
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 GetRequest ¶
type GetRequest struct { MAC string `protobuf:"bytes,1,opt,name=MAC,proto3" json:"MAC,omitempty"` IP string `protobuf:"bytes,2,opt,name=IP,proto3" json:"IP,omitempty"` ID string `protobuf:"bytes,3,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetID ¶
func (x *GetRequest) GetID() string
func (*GetRequest) GetIP ¶
func (x *GetRequest) GetIP() string
func (*GetRequest) GetMAC ¶
func (x *GetRequest) GetMAC() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type Hardware ¶
type Hardware struct { JSON string `protobuf:"bytes,1,opt,name=JSON,proto3" json:"JSON,omitempty"` // contains filtered or unexported fields }
func (*Hardware) Descriptor
deprecated
func (*Hardware) ProtoMessage ¶
func (*Hardware) ProtoMessage()
func (*Hardware) ProtoReflect ¶
func (x *Hardware) ProtoReflect() protoreflect.Message
type PushRequest ¶
type PushRequest struct { Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetData ¶
func (x *PushRequest) GetData() string
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type UnimplementedCacherServer ¶
type UnimplementedCacherServer struct { }
UnimplementedCacherServer can be embedded to have forward compatible implementations.
func (*UnimplementedCacherServer) All ¶
func (*UnimplementedCacherServer) All(*Empty, Cacher_AllServer) error
func (*UnimplementedCacherServer) ByID ¶
func (*UnimplementedCacherServer) ByID(context.Context, *GetRequest) (*Hardware, error)
func (*UnimplementedCacherServer) ByIP ¶
func (*UnimplementedCacherServer) ByIP(context.Context, *GetRequest) (*Hardware, error)
func (*UnimplementedCacherServer) ByMAC ¶
func (*UnimplementedCacherServer) ByMAC(context.Context, *GetRequest) (*Hardware, error)
func (*UnimplementedCacherServer) Push ¶
func (*UnimplementedCacherServer) Push(context.Context, *PushRequest) (*Empty, error)
func (*UnimplementedCacherServer) Watch ¶
func (*UnimplementedCacherServer) Watch(*GetRequest, Cacher_WatchServer) error
Click to show internal directories.
Click to hide internal directories.