golang

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncResponse_Code_name = map[int32]string{
		0:  "META",
		1:  "CONTINUE",
		2:  "HANDOVER",
		3:  "CLEAR",
		10: "FAULT",
		11: "ERROR",
		12: "FAILURE",
	}
	SyncResponse_Code_value = map[string]int32{
		"META":     0,
		"CONTINUE": 1,
		"HANDOVER": 2,
		"CLEAR":    3,
		"FAULT":    10,
		"ERROR":    11,
		"FAILURE":  12,
	}
)

Enum value maps for SyncResponse_Code.

Functions

func RegisterApiServiceServer

func RegisterApiServiceServer(s *grpc.Server, srv ApiServiceServer)

Types

type ApiServiceClient

type ApiServiceClient interface {
	Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (ApiService_SyncClient, error)
}

ApiServiceClient is the client API for ApiService service.

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

func NewApiServiceClient

func NewApiServiceClient(cc grpc.ClientConnInterface) ApiServiceClient

type ApiServiceServer

type ApiServiceServer interface {
	Sync(*SyncRequest, ApiService_SyncServer) error
}

ApiServiceServer is the server API for ApiService service.

type ApiService_SyncClient

type ApiService_SyncClient interface {
	Recv() (*SyncResponse, error)
	grpc.ClientStream
}

type ApiService_SyncServer

type ApiService_SyncServer interface {
	Send(*SyncResponse) error
	grpc.ServerStream
}

type Node

type Node struct {
	NodeId  string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	RunId   string `protobuf:"bytes,3,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetAddress

func (x *Node) GetAddress() string

func (*Node) GetNodeId

func (x *Node) GetNodeId() string

func (*Node) GetRunId

func (x *Node) GetRunId() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type SyncRequest

type SyncRequest struct {
	Node   *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetNode

func (x *SyncRequest) GetNode() *Node

func (*SyncRequest) GetOffset

func (x *SyncRequest) GetOffset() int64

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

func (x *SyncRequest) ProtoReflect() protoreflect.Message

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {
	Code   SyncResponse_Code  `protobuf:"varint,1,opt,name=code,proto3,enum=apiservice.SyncResponse_Code" json:"code,omitempty"`
	Meta   *SyncResponse_Meta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"`
	Offset int64              `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	Size   int64              `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	Data   []byte             `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncResponse) Descriptor deprecated

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

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetCode

func (x *SyncResponse) GetCode() SyncResponse_Code

func (*SyncResponse) GetData

func (x *SyncResponse) GetData() []byte

func (*SyncResponse) GetMeta

func (x *SyncResponse) GetMeta() *SyncResponse_Meta

func (*SyncResponse) GetOffset

func (x *SyncResponse) GetOffset() int64

func (*SyncResponse) GetSize

func (x *SyncResponse) GetSize() int64

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

func (x *SyncResponse) ProtoReflect() protoreflect.Message

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type SyncResponse_Code

type SyncResponse_Code int32
const (
	// FAULT -> ERROR -> FAILURE
	SyncResponse_META     SyncResponse_Code = 0
	SyncResponse_CONTINUE SyncResponse_Code = 1
	SyncResponse_HANDOVER SyncResponse_Code = 2
	SyncResponse_CLEAR    SyncResponse_Code = 3
	SyncResponse_FAULT    SyncResponse_Code = 10 // network or lower level
	SyncResponse_ERROR    SyncResponse_Code = 11 // logical
	SyncResponse_FAILURE  SyncResponse_Code = 12 // service, should be restart
)

func (SyncResponse_Code) Descriptor

func (SyncResponse_Code) Enum

func (SyncResponse_Code) EnumDescriptor deprecated

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

Deprecated: Use SyncResponse_Code.Descriptor instead.

func (SyncResponse_Code) Number

func (SyncResponse_Code) String

func (x SyncResponse_Code) String() string

func (SyncResponse_Code) Type

type SyncResponse_Meta

type SyncResponse_Meta struct {
	RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	Msg   string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Aof   bool   `protobuf:"varint,3,opt,name=aof,proto3" json:"aof,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncResponse_Meta) Descriptor deprecated

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

Deprecated: Use SyncResponse_Meta.ProtoReflect.Descriptor instead.

func (*SyncResponse_Meta) GetAof

func (x *SyncResponse_Meta) GetAof() bool

func (*SyncResponse_Meta) GetMsg

func (x *SyncResponse_Meta) GetMsg() string

func (*SyncResponse_Meta) GetRunId

func (x *SyncResponse_Meta) GetRunId() string

func (*SyncResponse_Meta) ProtoMessage

func (*SyncResponse_Meta) ProtoMessage()

func (*SyncResponse_Meta) ProtoReflect

func (x *SyncResponse_Meta) ProtoReflect() protoreflect.Message

func (*SyncResponse_Meta) Reset

func (x *SyncResponse_Meta) Reset()

func (*SyncResponse_Meta) String

func (x *SyncResponse_Meta) String() string

type UnimplementedApiServiceServer

type UnimplementedApiServiceServer struct {
}

UnimplementedApiServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedApiServiceServer) Sync

Jump to

Keyboard shortcuts

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