state

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStateServer

func RegisterStateServer(s *grpc.Server, srv StateServer)

Types

type Command

type Command struct {
	Kind                 string   `protobuf:"bytes,1,opt,name=Kind,proto3" json:"Kind,omitempty"`
	ID                   int64    `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command) Descriptor

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

func (*Command) GetID

func (m *Command) GetID() int64

func (*Command) GetKind

func (m *Command) GetKind() string

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) String

func (m *Command) String() string

func (*Command) XXX_DiscardUnknown

func (m *Command) XXX_DiscardUnknown()

func (*Command) XXX_Marshal

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

func (*Command) XXX_Merge

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

func (*Command) XXX_Size

func (m *Command) XXX_Size() int

func (*Command) XXX_Unmarshal

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

type Data

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

func (*Data) Descriptor

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

func (*Data) GetContent

func (m *Data) GetContent() []byte

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) Reset

func (m *Data) Reset()

func (*Data) String

func (m *Data) String() string

func (*Data) XXX_DiscardUnknown

func (m *Data) XXX_DiscardUnknown()

func (*Data) XXX_Marshal

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

func (*Data) XXX_Merge

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

func (*Data) XXX_Size

func (m *Data) XXX_Size() int

func (*Data) XXX_Unmarshal

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

type Domain

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

func (*Domain) Descriptor

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

func (*Domain) GetName

func (m *Domain) GetName() string

func (*Domain) ProtoMessage

func (*Domain) ProtoMessage()

func (*Domain) Reset

func (m *Domain) Reset()

func (*Domain) String

func (m *Domain) String() string

func (*Domain) XXX_DiscardUnknown

func (m *Domain) XXX_DiscardUnknown()

func (*Domain) XXX_Marshal

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

func (*Domain) XXX_Merge

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

func (*Domain) XXX_Size

func (m *Domain) XXX_Size() int

func (*Domain) XXX_Unmarshal

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

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

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

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

type Kind

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

func (*Kind) Descriptor

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

func (*Kind) GetName

func (m *Kind) GetName() string

func (*Kind) ProtoMessage

func (*Kind) ProtoMessage()

func (*Kind) Reset

func (m *Kind) Reset()

func (*Kind) String

func (m *Kind) String() string

func (*Kind) XXX_DiscardUnknown

func (m *Kind) XXX_DiscardUnknown()

func (*Kind) XXX_Marshal

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

func (*Kind) XXX_Merge

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

func (*Kind) XXX_Size

func (m *Kind) XXX_Size() int

func (*Kind) XXX_Unmarshal

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

type StateClient

type StateClient interface {
	GetDomain(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Domain, error)
	Drain(ctx context.Context, in *Kind, opts ...grpc.CallOption) (State_DrainClient, error)
	SendCommand(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Empty, error)
}

StateClient is the client API for State service.

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

func NewStateClient

func NewStateClient(cc *grpc.ClientConn) StateClient

type StateServer

type StateServer interface {
	GetDomain(context.Context, *Empty) (*Domain, error)
	Drain(*Kind, State_DrainServer) error
	SendCommand(context.Context, *Command) (*Empty, error)
}

StateServer is the server API for State service.

type State_DrainClient

type State_DrainClient interface {
	Recv() (*Data, error)
	grpc.ClientStream
}

type State_DrainServer

type State_DrainServer interface {
	Send(*Data) error
	grpc.ServerStream
}

type UnimplementedStateServer

type UnimplementedStateServer struct {
}

UnimplementedStateServer can be embedded to have forward compatible implementations.

func (*UnimplementedStateServer) Drain

func (*UnimplementedStateServer) GetDomain

func (*UnimplementedStateServer) GetDomain(ctx context.Context, req *Empty) (*Domain, error)

func (*UnimplementedStateServer) SendCommand

func (*UnimplementedStateServer) SendCommand(ctx context.Context, req *Command) (*Empty, error)

Jump to

Keyboard shortcuts

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