Documentation ¶
Index ¶
- Variables
- func RegisterDeviceServer(s grpc.ServiceRegistrar, srv DeviceServer)
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect(ctx context.Context, in *ConnectReq, opts ...grpc.CallOption) (*ConnectReply, error)
- func (c *Client) DisConnect(ctx context.Context, in *DisConnectReq, opts ...grpc.CallOption) (*DisConnectReply, error)
- func (c *Client) Focus(ctx context.Context, in *FocusReq, opts ...grpc.CallOption) (*FocusReply, error)
- func (c *Client) Input(ctx context.Context, opts ...grpc.CallOption) (Device_InputClient, error)
- func (c *Client) Output(ctx context.Context, in *OutputReq, opts ...grpc.CallOption) (Device_OutputClient, error)
- func (c *Client) ReConnect(ctx context.Context, in *ReConnectReq, opts ...grpc.CallOption) (*ReConnectReply, error)
- type ConnectReply
- type ConnectReq
- type DeviceClient
- type DeviceServer
- type Device_InputClient
- type Device_InputServer
- type Device_OutputClient
- type Device_OutputServer
- type DisConnectReply
- type DisConnectReq
- type FocusReply
- type FocusReq
- type InputReply
- type InputReq
- type OutputReply
- func (*OutputReply) Descriptor() ([]byte, []int)deprecated
- func (x *OutputReply) GetChannelType() int32
- func (x *OutputReply) GetMsg() string
- func (x *OutputReply) GetTarget() string
- func (*OutputReply) ProtoMessage()
- func (x *OutputReply) ProtoReflect() protoreflect.Message
- func (x *OutputReply) Reset()
- func (x *OutputReply) String() string
- type OutputReq
- type ReConnectReply
- type ReConnectReq
- type UnimplementedDeviceServer
- func (UnimplementedDeviceServer) Connect(context.Context, *ConnectReq) (*ConnectReply, error)
- func (UnimplementedDeviceServer) DisConnect(context.Context, *DisConnectReq) (*DisConnectReply, error)
- func (UnimplementedDeviceServer) Focus(context.Context, *FocusReq) (*FocusReply, error)
- func (UnimplementedDeviceServer) Input(Device_InputServer) error
- func (UnimplementedDeviceServer) Output(*OutputReq, Device_OutputServer) error
- func (UnimplementedDeviceServer) ReConnect(context.Context, *ReConnectReq) (*ReConnectReply, error)
- type UnsafeDeviceServer
Constants ¶
This section is empty.
Variables ¶
var Device_ServiceDesc = grpc.ServiceDesc{ ServiceName: "device.Device", HandlerType: (*DeviceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Connect", Handler: _Device_Connect_Handler, }, { MethodName: "ReConnect", Handler: _Device_ReConnect_Handler, }, { MethodName: "DisConnect", Handler: _Device_DisConnect_Handler, }, { MethodName: "Focus", Handler: _Device_Focus_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Input", Handler: _Device_Input_Handler, ClientStreams: true, }, { StreamName: "Output", Handler: _Device_Output_Handler, ServerStreams: true, }, }, Metadata: "device.proto", }
Device_ServiceDesc is the grpc.ServiceDesc for Device service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_device_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDeviceServer ¶
func RegisterDeviceServer(s grpc.ServiceRegistrar, srv DeviceServer)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Connect ¶
func (c *Client) Connect(ctx context.Context, in *ConnectReq, opts ...grpc.CallOption) (*ConnectReply, error)
func (*Client) DisConnect ¶
func (c *Client) DisConnect(ctx context.Context, in *DisConnectReq, opts ...grpc.CallOption) (*DisConnectReply, error)
func (*Client) Focus ¶
func (c *Client) Focus(ctx context.Context, in *FocusReq, opts ...grpc.CallOption) (*FocusReply, error)
func (*Client) Input ¶
func (c *Client) Input(ctx context.Context, opts ...grpc.CallOption) (Device_InputClient, error)
func (*Client) Output ¶
func (c *Client) Output(ctx context.Context, in *OutputReq, opts ...grpc.CallOption) (Device_OutputClient, error)
func (*Client) ReConnect ¶
func (c *Client) ReConnect(ctx context.Context, in *ReConnectReq, opts ...grpc.CallOption) (*ReConnectReply, error)
type ConnectReply ¶
type ConnectReply struct {
// contains filtered or unexported fields
}
func (*ConnectReply) Descriptor
deprecated
func (*ConnectReply) Descriptor() ([]byte, []int)
Deprecated: Use ConnectReply.ProtoReflect.Descriptor instead.
func (*ConnectReply) ProtoMessage ¶
func (*ConnectReply) ProtoMessage()
func (*ConnectReply) ProtoReflect ¶
func (x *ConnectReply) ProtoReflect() protoreflect.Message
func (*ConnectReply) Reset ¶
func (x *ConnectReply) Reset()
func (*ConnectReply) String ¶
func (x *ConnectReply) String() string
type ConnectReq ¶
type ConnectReq struct {
// contains filtered or unexported fields
}
func (*ConnectReq) Descriptor
deprecated
func (*ConnectReq) Descriptor() ([]byte, []int)
Deprecated: Use ConnectReq.ProtoReflect.Descriptor instead.
func (*ConnectReq) ProtoMessage ¶
func (*ConnectReq) ProtoMessage()
func (*ConnectReq) ProtoReflect ¶
func (x *ConnectReq) ProtoReflect() protoreflect.Message
func (*ConnectReq) Reset ¶
func (x *ConnectReq) Reset()
func (*ConnectReq) String ¶
func (x *ConnectReq) String() string
type DeviceClient ¶
type DeviceClient interface { Connect(ctx context.Context, in *ConnectReq, opts ...grpc.CallOption) (*ConnectReply, error) ReConnect(ctx context.Context, in *ReConnectReq, opts ...grpc.CallOption) (*ReConnectReply, error) DisConnect(ctx context.Context, in *DisConnectReq, opts ...grpc.CallOption) (*DisConnectReply, error) Focus(ctx context.Context, in *FocusReq, opts ...grpc.CallOption) (*FocusReply, error) Input(ctx context.Context, opts ...grpc.CallOption) (Device_InputClient, error) Output(ctx context.Context, in *OutputReq, opts ...grpc.CallOption) (Device_OutputClient, error) }
DeviceClient is the client API for Device 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 NewDeviceClient ¶
func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient
type DeviceServer ¶
type DeviceServer interface { Connect(context.Context, *ConnectReq) (*ConnectReply, error) ReConnect(context.Context, *ReConnectReq) (*ReConnectReply, error) DisConnect(context.Context, *DisConnectReq) (*DisConnectReply, error) Focus(context.Context, *FocusReq) (*FocusReply, error) Input(Device_InputServer) error Output(*OutputReq, Device_OutputServer) error // contains filtered or unexported methods }
DeviceServer is the server API for Device service. All implementations must embed UnimplementedDeviceServer for forward compatibility
type Device_InputClient ¶
type Device_InputClient interface { Send(*InputReq) error CloseAndRecv() (*InputReply, error) grpc.ClientStream }
type Device_InputServer ¶
type Device_InputServer interface { SendAndClose(*InputReply) error Recv() (*InputReq, error) grpc.ServerStream }
type Device_OutputClient ¶
type Device_OutputClient interface { Recv() (*OutputReply, error) grpc.ClientStream }
type Device_OutputServer ¶
type Device_OutputServer interface { Send(*OutputReply) error grpc.ServerStream }
type DisConnectReply ¶
type DisConnectReply struct {
// contains filtered or unexported fields
}
func (*DisConnectReply) Descriptor
deprecated
func (*DisConnectReply) Descriptor() ([]byte, []int)
Deprecated: Use DisConnectReply.ProtoReflect.Descriptor instead.
func (*DisConnectReply) ProtoMessage ¶
func (*DisConnectReply) ProtoMessage()
func (*DisConnectReply) ProtoReflect ¶
func (x *DisConnectReply) ProtoReflect() protoreflect.Message
func (*DisConnectReply) Reset ¶
func (x *DisConnectReply) Reset()
func (*DisConnectReply) String ¶
func (x *DisConnectReply) String() string
type DisConnectReq ¶
type DisConnectReq struct {
// contains filtered or unexported fields
}
func (*DisConnectReq) Descriptor
deprecated
func (*DisConnectReq) Descriptor() ([]byte, []int)
Deprecated: Use DisConnectReq.ProtoReflect.Descriptor instead.
func (*DisConnectReq) ProtoMessage ¶
func (*DisConnectReq) ProtoMessage()
func (*DisConnectReq) ProtoReflect ¶
func (x *DisConnectReq) ProtoReflect() protoreflect.Message
func (*DisConnectReq) Reset ¶
func (x *DisConnectReq) Reset()
func (*DisConnectReq) String ¶
func (x *DisConnectReq) String() string
type FocusReply ¶
type FocusReply struct {
// contains filtered or unexported fields
}
func (*FocusReply) Descriptor
deprecated
func (*FocusReply) Descriptor() ([]byte, []int)
Deprecated: Use FocusReply.ProtoReflect.Descriptor instead.
func (*FocusReply) ProtoMessage ¶
func (*FocusReply) ProtoMessage()
func (*FocusReply) ProtoReflect ¶
func (x *FocusReply) ProtoReflect() protoreflect.Message
func (*FocusReply) Reset ¶
func (x *FocusReply) Reset()
func (*FocusReply) String ¶
func (x *FocusReply) String() string
type FocusReq ¶
type FocusReq struct { ChannelType int32 `protobuf:"varint,1,opt,name=channelType,proto3" json:"channelType,omitempty"` Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` // contains filtered or unexported fields }
func (*FocusReq) Descriptor
deprecated
func (*FocusReq) GetChannelType ¶
func (*FocusReq) ProtoMessage ¶
func (*FocusReq) ProtoMessage()
func (*FocusReq) ProtoReflect ¶
func (x *FocusReq) ProtoReflect() protoreflect.Message
type InputReply ¶
type InputReply struct { Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func (*InputReply) Descriptor
deprecated
func (*InputReply) Descriptor() ([]byte, []int)
Deprecated: Use InputReply.ProtoReflect.Descriptor instead.
func (*InputReply) GetErr ¶
func (x *InputReply) GetErr() string
func (*InputReply) ProtoMessage ¶
func (*InputReply) ProtoMessage()
func (*InputReply) ProtoReflect ¶
func (x *InputReply) ProtoReflect() protoreflect.Message
func (*InputReply) Reset ¶
func (x *InputReply) Reset()
func (*InputReply) String ¶
func (x *InputReply) String() string
type InputReq ¶
type InputReq struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*InputReq) Descriptor
deprecated
func (*InputReq) ProtoMessage ¶
func (*InputReq) ProtoMessage()
func (*InputReq) ProtoReflect ¶
func (x *InputReq) ProtoReflect() protoreflect.Message
type OutputReply ¶
type OutputReply struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` ChannelType int32 `protobuf:"varint,2,opt,name=channelType,proto3" json:"channelType,omitempty"` Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` // contains filtered or unexported fields }
func (*OutputReply) Descriptor
deprecated
func (*OutputReply) Descriptor() ([]byte, []int)
Deprecated: Use OutputReply.ProtoReflect.Descriptor instead.
func (*OutputReply) GetChannelType ¶
func (x *OutputReply) GetChannelType() int32
func (*OutputReply) GetMsg ¶
func (x *OutputReply) GetMsg() string
func (*OutputReply) GetTarget ¶
func (x *OutputReply) GetTarget() string
func (*OutputReply) ProtoMessage ¶
func (*OutputReply) ProtoMessage()
func (*OutputReply) ProtoReflect ¶
func (x *OutputReply) ProtoReflect() protoreflect.Message
func (*OutputReply) Reset ¶
func (x *OutputReply) Reset()
func (*OutputReply) String ¶
func (x *OutputReply) String() string
type OutputReq ¶
type OutputReq struct {
// contains filtered or unexported fields
}
func (*OutputReq) Descriptor
deprecated
func (*OutputReq) ProtoMessage ¶
func (*OutputReq) ProtoMessage()
func (*OutputReq) ProtoReflect ¶
func (x *OutputReq) ProtoReflect() protoreflect.Message
type ReConnectReply ¶
type ReConnectReply struct {
// contains filtered or unexported fields
}
func (*ReConnectReply) Descriptor
deprecated
func (*ReConnectReply) Descriptor() ([]byte, []int)
Deprecated: Use ReConnectReply.ProtoReflect.Descriptor instead.
func (*ReConnectReply) ProtoMessage ¶
func (*ReConnectReply) ProtoMessage()
func (*ReConnectReply) ProtoReflect ¶
func (x *ReConnectReply) ProtoReflect() protoreflect.Message
func (*ReConnectReply) Reset ¶
func (x *ReConnectReply) Reset()
func (*ReConnectReply) String ¶
func (x *ReConnectReply) String() string
type ReConnectReq ¶
type ReConnectReq struct {
// contains filtered or unexported fields
}
func (*ReConnectReq) Descriptor
deprecated
func (*ReConnectReq) Descriptor() ([]byte, []int)
Deprecated: Use ReConnectReq.ProtoReflect.Descriptor instead.
func (*ReConnectReq) ProtoMessage ¶
func (*ReConnectReq) ProtoMessage()
func (*ReConnectReq) ProtoReflect ¶
func (x *ReConnectReq) ProtoReflect() protoreflect.Message
func (*ReConnectReq) Reset ¶
func (x *ReConnectReq) Reset()
func (*ReConnectReq) String ¶
func (x *ReConnectReq) String() string
type UnimplementedDeviceServer ¶
type UnimplementedDeviceServer struct { }
UnimplementedDeviceServer must be embedded to have forward compatible implementations.
func (UnimplementedDeviceServer) Connect ¶
func (UnimplementedDeviceServer) Connect(context.Context, *ConnectReq) (*ConnectReply, error)
func (UnimplementedDeviceServer) DisConnect ¶
func (UnimplementedDeviceServer) DisConnect(context.Context, *DisConnectReq) (*DisConnectReply, error)
func (UnimplementedDeviceServer) Focus ¶
func (UnimplementedDeviceServer) Focus(context.Context, *FocusReq) (*FocusReply, error)
func (UnimplementedDeviceServer) Input ¶
func (UnimplementedDeviceServer) Input(Device_InputServer) error
func (UnimplementedDeviceServer) Output ¶
func (UnimplementedDeviceServer) Output(*OutputReq, Device_OutputServer) error
func (UnimplementedDeviceServer) ReConnect ¶
func (UnimplementedDeviceServer) ReConnect(context.Context, *ReConnectReq) (*ReConnectReply, error)
type UnsafeDeviceServer ¶
type UnsafeDeviceServer interface {
// contains filtered or unexported methods
}
UnsafeDeviceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeviceServer will result in compilation errors.