Documentation ¶
Index ¶
- func RegisterSwitchServiceServer(s *grpc.Server, srv SwitchServiceServer)
- type StateResponse
- func (*StateResponse) Descriptor() ([]byte, []int)
- func (m *StateResponse) GetState() string
- func (*StateResponse) ProtoMessage()
- func (m *StateResponse) Reset()
- func (m *StateResponse) String() string
- func (m *StateResponse) XXX_DiscardUnknown()
- func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StateResponse) XXX_Merge(src proto.Message)
- func (m *StateResponse) XXX_Size() int
- func (m *StateResponse) XXX_Unmarshal(b []byte) error
- type SwitchServiceClient
- type SwitchServiceServer
- type UnimplementedSwitchServiceServer
- func (*UnimplementedSwitchServiceServer) Off(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (*UnimplementedSwitchServiceServer) On(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (*UnimplementedSwitchServiceServer) State(ctx context.Context, req *empty.Empty) (*StateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSwitchServiceServer ¶
func RegisterSwitchServiceServer(s *grpc.Server, srv SwitchServiceServer)
Types ¶
type StateResponse ¶
type StateResponse struct { State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StateResponse) Descriptor ¶
func (*StateResponse) Descriptor() ([]byte, []int)
func (*StateResponse) GetState ¶
func (m *StateResponse) GetState() string
func (*StateResponse) ProtoMessage ¶
func (*StateResponse) ProtoMessage()
func (*StateResponse) Reset ¶
func (m *StateResponse) Reset()
func (*StateResponse) String ¶
func (m *StateResponse) String() string
func (*StateResponse) XXX_DiscardUnknown ¶
func (m *StateResponse) XXX_DiscardUnknown()
func (*StateResponse) XXX_Marshal ¶
func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StateResponse) XXX_Merge ¶
func (m *StateResponse) XXX_Merge(src proto.Message)
func (*StateResponse) XXX_Size ¶
func (m *StateResponse) XXX_Size() int
func (*StateResponse) XXX_Unmarshal ¶
func (m *StateResponse) XXX_Unmarshal(b []byte) error
type SwitchServiceClient ¶
type SwitchServiceClient interface { // turn switch on On(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) // turn stitch off Off(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) // get switch state State(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*StateResponse, error) }
SwitchServiceClient is the client API for SwitchService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSwitchServiceClient ¶
func NewSwitchServiceClient(cc *grpc.ClientConn) SwitchServiceClient
type SwitchServiceServer ¶
type SwitchServiceServer interface { // turn switch on On(context.Context, *empty.Empty) (*empty.Empty, error) // turn stitch off Off(context.Context, *empty.Empty) (*empty.Empty, error) // get switch state State(context.Context, *empty.Empty) (*StateResponse, error) }
SwitchServiceServer is the server API for SwitchService service.
type UnimplementedSwitchServiceServer ¶
type UnimplementedSwitchServiceServer struct { }
UnimplementedSwitchServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedSwitchServiceServer) State ¶
func (*UnimplementedSwitchServiceServer) State(ctx context.Context, req *empty.Empty) (*StateResponse, error)
Click to show internal directories.
Click to hide internal directories.