goserver

package
v0.0.0-...-30ff9d4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 90

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContextType_name = map[int32]string{
		0: "UNKNOWN",
		1: "REGULAR",
		4: "MEDIUM",
		2: "LONG",
		3: "INFINITE",
		5: "NO_TRACE",
	}
	ContextType_value = map[string]int32{
		"UNKNOWN":  0,
		"REGULAR":  1,
		"MEDIUM":   4,
		"LONG":     2,
		"INFINITE": 3,
		"NO_TRACE": 5,
	}
)

Enum value maps for ContextType.

View Source
var (
	LeadState_name = map[int32]string{
		0: "ELECTING",
		1: "FOLLOWER",
		2: "LEADER",
	}
	LeadState_value = map[string]int32{
		"ELECTING": 0,
		"FOLLOWER": 1,
		"LEADER":   2,
	}
)

Enum value maps for LeadState.

View Source
var File_goserver_proto protoreflect.FileDescriptor

Functions

func RegisterGoserverServiceServer

func RegisterGoserverServiceServer(s grpc.ServiceRegistrar, srv GoserverServiceServer)

Types

type Alive

type Alive struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Alive) Descriptor deprecated

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

Deprecated: Use Alive.ProtoReflect.Descriptor instead.

func (*Alive) GetName

func (x *Alive) GetName() string

func (*Alive) ProtoMessage

func (*Alive) ProtoMessage()

func (*Alive) ProtoReflect

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

func (*Alive) Reset

func (x *Alive) Reset()

func (*Alive) String

func (x *Alive) String() string

type ChooseLeadRequest

type ChooseLeadRequest struct {
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

func (*ChooseLeadRequest) Descriptor deprecated

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

Deprecated: Use ChooseLeadRequest.ProtoReflect.Descriptor instead.

func (*ChooseLeadRequest) GetServer

func (x *ChooseLeadRequest) GetServer() string

func (*ChooseLeadRequest) ProtoMessage

func (*ChooseLeadRequest) ProtoMessage()

func (*ChooseLeadRequest) ProtoReflect

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

func (*ChooseLeadRequest) Reset

func (x *ChooseLeadRequest) Reset()

func (*ChooseLeadRequest) String

func (x *ChooseLeadRequest) String() string

type ChooseLeadResponse

type ChooseLeadResponse struct {
	Chosen string `protobuf:"bytes,2,opt,name=chosen,proto3" json:"chosen,omitempty"`
	// contains filtered or unexported fields
}

func (*ChooseLeadResponse) Descriptor deprecated

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

Deprecated: Use ChooseLeadResponse.ProtoReflect.Descriptor instead.

func (*ChooseLeadResponse) GetChosen

func (x *ChooseLeadResponse) GetChosen() string

func (*ChooseLeadResponse) ProtoMessage

func (*ChooseLeadResponse) ProtoMessage()

func (*ChooseLeadResponse) ProtoReflect

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

func (*ChooseLeadResponse) Reset

func (x *ChooseLeadResponse) Reset()

func (*ChooseLeadResponse) String

func (x *ChooseLeadResponse) String() string

type ContextType

type ContextType int32
const (
	ContextType_UNKNOWN  ContextType = 0
	ContextType_REGULAR  ContextType = 1
	ContextType_MEDIUM   ContextType = 4
	ContextType_LONG     ContextType = 2
	ContextType_INFINITE ContextType = 3
	ContextType_NO_TRACE ContextType = 5
)

func (ContextType) Descriptor

func (ContextType) Enum

func (x ContextType) Enum() *ContextType

func (ContextType) EnumDescriptor deprecated

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

Deprecated: Use ContextType.Descriptor instead.

func (ContextType) Number

func (x ContextType) Number() protoreflect.EnumNumber

func (ContextType) String

func (x ContextType) String() string

func (ContextType) Type

type EmbeddedTest

type EmbeddedTest struct {
	Blah *Alive `protobuf:"bytes,1,opt,name=blah,proto3" json:"blah,omitempty"`
	Test string `protobuf:"bytes,2,opt,name=test,proto3" json:"test,omitempty"`
	// contains filtered or unexported fields
}

func (*EmbeddedTest) Descriptor deprecated

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

Deprecated: Use EmbeddedTest.ProtoReflect.Descriptor instead.

func (*EmbeddedTest) GetBlah

func (x *EmbeddedTest) GetBlah() *Alive

func (*EmbeddedTest) GetTest

func (x *EmbeddedTest) GetTest() string

func (*EmbeddedTest) ProtoMessage

func (*EmbeddedTest) ProtoMessage()

func (*EmbeddedTest) ProtoReflect

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

func (*EmbeddedTest) Reset

func (x *EmbeddedTest) Reset()

func (*EmbeddedTest) String

func (x *EmbeddedTest) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GoserverServiceClient

type GoserverServiceClient interface {
	IsAlive(ctx context.Context, in *Alive, opts ...grpc.CallOption) (*Alive, error)
	State(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ServerState, error)
	Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error)
	Reregister(ctx context.Context, in *ReregisterRequest, opts ...grpc.CallOption) (*ReregisterResponse, error)
	ChooseLead(ctx context.Context, in *ChooseLeadRequest, opts ...grpc.CallOption) (*ChooseLeadResponse, error)
}

GoserverServiceClient is the client API for GoserverService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type GoserverServiceServer

GoserverServiceServer is the server API for GoserverService service. All implementations should embed UnimplementedGoserverServiceServer for forward compatibility

type LeadState

type LeadState int32
const (
	LeadState_ELECTING LeadState = 0
	LeadState_FOLLOWER LeadState = 1
	LeadState_LEADER   LeadState = 2
)

func (LeadState) Descriptor

func (LeadState) Descriptor() protoreflect.EnumDescriptor

func (LeadState) Enum

func (x LeadState) Enum() *LeadState

func (LeadState) EnumDescriptor deprecated

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

Deprecated: Use LeadState.Descriptor instead.

func (LeadState) Number

func (x LeadState) Number() protoreflect.EnumNumber

func (LeadState) String

func (x LeadState) String() string

func (LeadState) Type

type MoteRequest

type MoteRequest struct {
	Master bool `protobuf:"varint,1,opt,name=master,proto3" json:"master,omitempty"`
	// contains filtered or unexported fields
}

func (*MoteRequest) Descriptor deprecated

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

Deprecated: Use MoteRequest.ProtoReflect.Descriptor instead.

func (*MoteRequest) GetMaster

func (x *MoteRequest) GetMaster() bool

func (*MoteRequest) ProtoMessage

func (*MoteRequest) ProtoMessage()

func (*MoteRequest) ProtoReflect

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

func (*MoteRequest) Reset

func (x *MoteRequest) Reset()

func (*MoteRequest) String

func (x *MoteRequest) String() string

type ReregisterRequest

type ReregisterRequest struct {
	// contains filtered or unexported fields
}

func (*ReregisterRequest) Descriptor deprecated

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

Deprecated: Use ReregisterRequest.ProtoReflect.Descriptor instead.

func (*ReregisterRequest) ProtoMessage

func (*ReregisterRequest) ProtoMessage()

func (*ReregisterRequest) ProtoReflect

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

func (*ReregisterRequest) Reset

func (x *ReregisterRequest) Reset()

func (*ReregisterRequest) String

func (x *ReregisterRequest) String() string

type ReregisterResponse

type ReregisterResponse struct {
	// contains filtered or unexported fields
}

func (*ReregisterResponse) Descriptor deprecated

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

Deprecated: Use ReregisterResponse.ProtoReflect.Descriptor instead.

func (*ReregisterResponse) ProtoMessage

func (*ReregisterResponse) ProtoMessage()

func (*ReregisterResponse) ProtoReflect

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

func (*ReregisterResponse) Reset

func (x *ReregisterResponse) Reset()

func (*ReregisterResponse) String

func (x *ReregisterResponse) String() string

type ServerConfig

type ServerConfig struct {
	Periods []*TaskPeriod `protobuf:"bytes,1,rep,name=periods,proto3" json:"periods,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerConfig) Descriptor deprecated

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

Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.

func (*ServerConfig) GetPeriods

func (x *ServerConfig) GetPeriods() []*TaskPeriod

func (*ServerConfig) ProtoMessage

func (*ServerConfig) ProtoMessage()

func (*ServerConfig) ProtoReflect

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

func (*ServerConfig) Reset

func (x *ServerConfig) Reset()

func (*ServerConfig) String

func (x *ServerConfig) String() string

type ServerState

type ServerState struct {
	States []*State `protobuf:"bytes,1,rep,name=states,proto3" json:"states,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerState) Descriptor deprecated

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

Deprecated: Use ServerState.ProtoReflect.Descriptor instead.

func (*ServerState) GetStates

func (x *ServerState) GetStates() []*State

func (*ServerState) ProtoMessage

func (*ServerState) ProtoMessage()

func (*ServerState) ProtoReflect

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

func (*ServerState) Reset

func (x *ServerState) Reset()

func (*ServerState) String

func (x *ServerState) String() string

type ShutdownRequest

type ShutdownRequest struct {
	// contains filtered or unexported fields
}

func (*ShutdownRequest) Descriptor deprecated

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

Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead.

func (*ShutdownRequest) ProtoMessage

func (*ShutdownRequest) ProtoMessage()

func (*ShutdownRequest) ProtoReflect

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

func (*ShutdownRequest) Reset

func (x *ShutdownRequest) Reset()

func (*ShutdownRequest) String

func (x *ShutdownRequest) String() string

type ShutdownResponse

type ShutdownResponse struct {
	// contains filtered or unexported fields
}

func (*ShutdownResponse) Descriptor deprecated

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

Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead.

func (*ShutdownResponse) ProtoMessage

func (*ShutdownResponse) ProtoMessage()

func (*ShutdownResponse) ProtoReflect

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

func (*ShutdownResponse) Reset

func (x *ShutdownResponse) Reset()

func (*ShutdownResponse) String

func (x *ShutdownResponse) String() string

type State

type State struct {
	Key          string  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	TimeValue    int64   `protobuf:"varint,2,opt,name=time_value,json=timeValue,proto3" json:"time_value,omitempty"`
	Value        int64   `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
	Text         string  `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
	Fraction     float64 `protobuf:"fixed64,5,opt,name=fraction,proto3" json:"fraction,omitempty"`
	TimeDuration int64   `protobuf:"varint,6,opt,name=time_duration,json=timeDuration,proto3" json:"time_duration,omitempty"`
	// contains filtered or unexported fields
}

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetFraction

func (x *State) GetFraction() float64

func (*State) GetKey

func (x *State) GetKey() string

func (*State) GetText

func (x *State) GetText() string

func (*State) GetTimeDuration

func (x *State) GetTimeDuration() int64

func (*State) GetTimeValue

func (x *State) GetTimeValue() int64

func (*State) GetValue

func (x *State) GetValue() int64

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type TaskPeriod

type TaskPeriod struct {
	Key    string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Period int64  `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskPeriod) Descriptor deprecated

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

Deprecated: Use TaskPeriod.ProtoReflect.Descriptor instead.

func (*TaskPeriod) GetKey

func (x *TaskPeriod) GetKey() string

func (*TaskPeriod) GetPeriod

func (x *TaskPeriod) GetPeriod() int64

func (*TaskPeriod) ProtoMessage

func (*TaskPeriod) ProtoMessage()

func (*TaskPeriod) ProtoReflect

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

func (*TaskPeriod) Reset

func (x *TaskPeriod) Reset()

func (*TaskPeriod) String

func (x *TaskPeriod) String() string

type UnimplementedGoserverServiceServer

type UnimplementedGoserverServiceServer struct {
}

UnimplementedGoserverServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedGoserverServiceServer) ChooseLead

func (UnimplementedGoserverServiceServer) IsAlive

func (UnimplementedGoserverServiceServer) Reregister

func (UnimplementedGoserverServiceServer) Shutdown

func (UnimplementedGoserverServiceServer) State

type UnsafeGoserverServiceServer

type UnsafeGoserverServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeGoserverServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GoserverServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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