protobuf

package
v0.0.0-...-5837f0e Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterLichtServer

func RegisterLichtServer(s *grpc.Server, srv LichtServer)

Types

type LichtClient

type LichtClient interface {
	RequestKey(ctx context.Context, in *SearchKey, opts ...grpc.CallOption) (*ReturnValue, error)
}

LichtClient is the client API for Licht service.

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

func NewLichtClient

func NewLichtClient(cc *grpc.ClientConn) LichtClient

type LichtServer

type LichtServer interface {
	RequestKey(context.Context, *SearchKey) (*ReturnValue, error)
}

LichtServer is the server API for Licht service.

type ReturnValue

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

func (*ReturnValue) Descriptor

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

func (*ReturnValue) GetData

func (m *ReturnValue) GetData() []byte

func (*ReturnValue) GetHash

func (m *ReturnValue) GetHash() []byte

func (*ReturnValue) ProtoMessage

func (*ReturnValue) ProtoMessage()

func (*ReturnValue) Reset

func (m *ReturnValue) Reset()

func (*ReturnValue) String

func (m *ReturnValue) String() string

func (*ReturnValue) XXX_DiscardUnknown

func (m *ReturnValue) XXX_DiscardUnknown()

func (*ReturnValue) XXX_Marshal

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

func (*ReturnValue) XXX_Merge

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

func (*ReturnValue) XXX_Size

func (m *ReturnValue) XXX_Size() int

func (*ReturnValue) XXX_Unmarshal

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

type SearchKey

type SearchKey struct {
	Node                 int32    `protobuf:"varint,1,opt,name=node,proto3" json:"node,omitempty"`
	Key                  []byte   `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SearchKey) Descriptor

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

func (*SearchKey) GetKey

func (m *SearchKey) GetKey() []byte

func (*SearchKey) GetNode

func (m *SearchKey) GetNode() int32

func (*SearchKey) ProtoMessage

func (*SearchKey) ProtoMessage()

func (*SearchKey) Reset

func (m *SearchKey) Reset()

func (*SearchKey) String

func (m *SearchKey) String() string

func (*SearchKey) XXX_DiscardUnknown

func (m *SearchKey) XXX_DiscardUnknown()

func (*SearchKey) XXX_Marshal

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

func (*SearchKey) XXX_Merge

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

func (*SearchKey) XXX_Size

func (m *SearchKey) XXX_Size() int

func (*SearchKey) XXX_Unmarshal

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

type Server

type Server struct {
	lib.App
}

func (*Server) RequestKey

func (s *Server) RequestKey(ctx context.Context, sk *SearchKey) (*ReturnValue, error)

func (*Server) SetKV

func (s *Server) SetKV(ctx context.Context, sk *SetKey) (*empty.Empty, error)

type UnimplementedLichtServer

type UnimplementedLichtServer struct {
}

UnimplementedLichtServer can be embedded to have forward compatible implementations.

func (*UnimplementedLichtServer) RequestKey

Jump to

Keyboard shortcuts

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