ioserver

package
v0.0.0-...-75720aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var State_name = map[int32]string{
	0: "Low",
	1: "High",
}
View Source
var State_value = map[string]int32{
	"Low":  0,
	"High": 1,
}

Functions

func RegisterGPIOServiceServer

func RegisterGPIOServiceServer(s *grpc.Server, srv GPIOServiceServer)

Types

type GPIOServiceClient

type GPIOServiceClient interface {
	WatchPinState(ctx context.Context, in *Pin, opts ...grpc.CallOption) (GPIOService_WatchPinStateClient, error)
	UpdatePinState(ctx context.Context, in *UpdatePinStateRequest, opts ...grpc.CallOption) (*PinState, error)
	GetPinState(ctx context.Context, in *Pin, opts ...grpc.CallOption) (*PinState, error)
}

GPIOServiceClient is the client API for GPIOService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGPIOServiceClient

func NewGPIOServiceClient(cc *grpc.ClientConn) GPIOServiceClient

type GPIOServiceServer

type GPIOServiceServer interface {
	WatchPinState(*Pin, GPIOService_WatchPinStateServer) error
	UpdatePinState(context.Context, *UpdatePinStateRequest) (*PinState, error)
	GetPinState(context.Context, *Pin) (*PinState, error)
}

GPIOServiceServer is the server API for GPIOService service.

type GPIOService_WatchPinStateClient

type GPIOService_WatchPinStateClient interface {
	Recv() (*PinState, error)
	grpc.ClientStream
}

type GPIOService_WatchPinStateServer

type GPIOService_WatchPinStateServer interface {
	Send(*PinState) error
	grpc.ServerStream
}

type IOServer

type IOServer interface {
	GPIOServiceServer
	Serve()
	Close() error
}

func NewIOServer

func NewIOServer(log *logrus.Entry, socketPath string, io pio.IO) (IOServer, error)

type Pin

type Pin struct {
	Pin                  int32    `protobuf:"varint,1,opt,name=Pin,proto3" json:"Pin,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Pin) Descriptor

func (*Pin) Descriptor() ([]byte, []int)

func (*Pin) GetPin

func (m *Pin) GetPin() int32

func (*Pin) IOPin

func (m *Pin) IOPin() pio.Pin

func (*Pin) ProtoMessage

func (*Pin) ProtoMessage()

func (*Pin) Reset

func (m *Pin) Reset()

func (*Pin) String

func (m *Pin) String() string

func (*Pin) XXX_DiscardUnknown

func (m *Pin) XXX_DiscardUnknown()

func (*Pin) XXX_Marshal

func (m *Pin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pin) XXX_Merge

func (m *Pin) XXX_Merge(src proto.Message)

func (*Pin) XXX_Size

func (m *Pin) XXX_Size() int

func (*Pin) XXX_Unmarshal

func (m *Pin) XXX_Unmarshal(b []byte) error

type PinState

type PinState struct {
	State                State    `protobuf:"varint,1,opt,name=State,proto3,enum=ioserver.State" json:"State,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PinState) Descriptor

func (*PinState) Descriptor() ([]byte, []int)

func (*PinState) GetState

func (m *PinState) GetState() State

func (*PinState) ProtoMessage

func (*PinState) ProtoMessage()

func (*PinState) Reset

func (m *PinState) Reset()

func (*PinState) String

func (m *PinState) String() string

func (*PinState) XXX_DiscardUnknown

func (m *PinState) XXX_DiscardUnknown()

func (*PinState) XXX_Marshal

func (m *PinState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PinState) XXX_Merge

func (m *PinState) XXX_Merge(src proto.Message)

func (*PinState) XXX_Size

func (m *PinState) XXX_Size() int

func (*PinState) XXX_Unmarshal

func (m *PinState) XXX_Unmarshal(b []byte) error

type State

type State int32
const (
	State_Low  State = 0
	State_High State = 1
)

func (State) EnumDescriptor

func (State) EnumDescriptor() ([]byte, []int)

func (State) IOState

func (x State) IOState() pio.State

func (State) String

func (x State) String() string

type UnimplementedGPIOServiceServer

type UnimplementedGPIOServiceServer struct {
}

UnimplementedGPIOServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedGPIOServiceServer) GetPinState

func (*UnimplementedGPIOServiceServer) GetPinState(ctx context.Context, req *Pin) (*PinState, error)

func (*UnimplementedGPIOServiceServer) UpdatePinState

func (*UnimplementedGPIOServiceServer) WatchPinState

type UpdatePinStateRequest

type UpdatePinStateRequest struct {
	Pin                  *Pin     `protobuf:"bytes,1,opt,name=Pin,proto3" json:"Pin,omitempty"`
	State                State    `protobuf:"varint,2,opt,name=State,proto3,enum=ioserver.State" json:"State,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdatePinStateRequest) Descriptor

func (*UpdatePinStateRequest) Descriptor() ([]byte, []int)

func (*UpdatePinStateRequest) GetPin

func (m *UpdatePinStateRequest) GetPin() *Pin

func (*UpdatePinStateRequest) GetState

func (m *UpdatePinStateRequest) GetState() State

func (*UpdatePinStateRequest) ProtoMessage

func (*UpdatePinStateRequest) ProtoMessage()

func (*UpdatePinStateRequest) Reset

func (m *UpdatePinStateRequest) Reset()

func (*UpdatePinStateRequest) String

func (m *UpdatePinStateRequest) String() string

func (*UpdatePinStateRequest) XXX_DiscardUnknown

func (m *UpdatePinStateRequest) XXX_DiscardUnknown()

func (*UpdatePinStateRequest) XXX_Marshal

func (m *UpdatePinStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdatePinStateRequest) XXX_Merge

func (m *UpdatePinStateRequest) XXX_Merge(src proto.Message)

func (*UpdatePinStateRequest) XXX_Size

func (m *UpdatePinStateRequest) XXX_Size() int

func (*UpdatePinStateRequest) XXX_Unmarshal

func (m *UpdatePinStateRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL