messagepb

package
v0.0.0-...-c1683cc Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: CC-BY-4.0 Imports: 7 Imported by: 0

Documentation

Overview

Package messagepb is a generated protocol buffer package.

It is generated from these files:

messagepb.proto

It has these top-level messages:

PutRequest
ResponseHeader
PutResponse

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMessagepb = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessagepb   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterKVServer

func RegisterKVServer(s *grpc.Server, srv KVServer)

Types

type KVClient

type KVClient interface {
	// Put puts the given key into the store.
	// A put request increases the revision of the store,
	// and generates one event in the event history.
	Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
}

func NewKVClient

func NewKVClient(cc *grpc.ClientConn) KVClient

type KVServer

type KVServer interface {
	// Put puts the given key into the store.
	// A put request increases the revision of the store,
	// and generates one event in the event history.
	Put(context.Context, *PutRequest) (*PutResponse, error)
}

type PutRequest

type PutRequest struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*PutRequest) Marshal

func (m *PutRequest) Marshal() (data []byte, err error)

func (*PutRequest) MarshalTo

func (m *PutRequest) MarshalTo(data []byte) (int, error)

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) Reset

func (m *PutRequest) Reset()

func (*PutRequest) Size

func (m *PutRequest) Size() (n int)

func (*PutRequest) String

func (m *PutRequest) String() string

func (*PutRequest) Unmarshal

func (m *PutRequest) Unmarshal(data []byte) error

type PutResponse

type PutResponse struct {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}

func (*PutResponse) Marshal

func (m *PutResponse) Marshal() (data []byte, err error)

func (*PutResponse) MarshalTo

func (m *PutResponse) MarshalTo(data []byte) (int, error)

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset

func (m *PutResponse) Reset()

func (*PutResponse) Size

func (m *PutResponse) Size() (n int)

func (*PutResponse) String

func (m *PutResponse) String() string

func (*PutResponse) Unmarshal

func (m *PutResponse) Unmarshal(data []byte) error

type ResponseHeader

type ResponseHeader struct {
	Exist bool   `protobuf:"varint,1,opt,name=exist,proto3" json:"exist,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*ResponseHeader) Marshal

func (m *ResponseHeader) Marshal() (data []byte, err error)

func (*ResponseHeader) MarshalTo

func (m *ResponseHeader) MarshalTo(data []byte) (int, error)

func (*ResponseHeader) ProtoMessage

func (*ResponseHeader) ProtoMessage()

func (*ResponseHeader) Reset

func (m *ResponseHeader) Reset()

func (*ResponseHeader) Size

func (m *ResponseHeader) Size() (n int)

func (*ResponseHeader) String

func (m *ResponseHeader) String() string

func (*ResponseHeader) Unmarshal

func (m *ResponseHeader) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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