gcsServer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_gcsServer_proto protoreflect.FileDescriptor
View Source
var GcsGrpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gcsServer.GcsGrpc",
	HandlerType: (*GcsGrpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetNbh",
			Handler:    _GcsGrpc_GetNbh_Handler,
		},
		{
			MethodName: "GetAllNodes",
			Handler:    _GcsGrpc_GetAllNodes_Handler,
		},
		{
			MethodName: "GetOnlyAddr",
			Handler:    _GcsGrpc_GetOnlyAddr_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gcsServer.proto",
}

GcsGrpc_ServiceDesc is the grpc.ServiceDesc for GcsGrpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGcsGrpcServer

func RegisterGcsGrpcServer(s grpc.ServiceRegistrar, srv GcsGrpcServer)

Types

type AllNodes

type AllNodes struct {
	Nbh []*NbhInfo `protobuf:"bytes,1,rep,name=nbh,proto3" json:"nbh,omitempty"`
	// contains filtered or unexported fields
}

func (*AllNodes) Descriptor deprecated

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

Deprecated: Use AllNodes.ProtoReflect.Descriptor instead.

func (*AllNodes) GetNbh

func (x *AllNodes) GetNbh() []*NbhInfo

func (*AllNodes) ProtoMessage

func (*AllNodes) ProtoMessage()

func (*AllNodes) ProtoReflect

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

func (*AllNodes) Reset

func (x *AllNodes) Reset()

func (*AllNodes) String

func (x *AllNodes) String() string

type EmptyReq

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

func (*EmptyReq) Descriptor deprecated

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

Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead.

func (*EmptyReq) ProtoMessage

func (*EmptyReq) ProtoMessage()

func (*EmptyReq) ProtoReflect

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

func (*EmptyReq) Reset

func (x *EmptyReq) Reset()

func (*EmptyReq) String

func (x *EmptyReq) String() string

type GcsGrpcClient

type GcsGrpcClient interface {
	GetNbh(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Nbhnodes, error)
	GetAllNodes(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*AllNodes, error)
	GetOnlyAddr(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*OnlyAddr, error)
}

GcsGrpcClient is the client API for GcsGrpc 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.

func NewGcsGrpcClient

func NewGcsGrpcClient(cc grpc.ClientConnInterface) GcsGrpcClient

type GcsGrpcServer

type GcsGrpcServer interface {
	GetNbh(context.Context, *EmptyReq) (*Nbhnodes, error)
	GetAllNodes(context.Context, *EmptyReq) (*AllNodes, error)
	GetOnlyAddr(context.Context, *EmptyReq) (*OnlyAddr, error)
}

GcsGrpcServer is the server API for GcsGrpc service. All implementations should embed UnimplementedGcsGrpcServer for forward compatibility

type NbhInfo

type NbhInfo struct {
	Addr      string  `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Cpu       float32 `protobuf:"fixed32,2,opt,name=cpu,proto3" json:"cpu,omitempty"`
	Ram       float32 `protobuf:"fixed32,3,opt,name=ram,proto3" json:"ram,omitempty"`
	Queuenum  int32   `protobuf:"varint,4,opt,name=queuenum,proto3" json:"queuenum,omitempty"`
	Visitnum  int32   `protobuf:"varint,5,opt,name=visitnum,proto3" json:"visitnum,omitempty"`
	Timestamp int64   `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*NbhInfo) Descriptor deprecated

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

Deprecated: Use NbhInfo.ProtoReflect.Descriptor instead.

func (*NbhInfo) GetAddr

func (x *NbhInfo) GetAddr() string

func (*NbhInfo) GetCpu

func (x *NbhInfo) GetCpu() float32

func (*NbhInfo) GetQueuenum

func (x *NbhInfo) GetQueuenum() int32

func (*NbhInfo) GetRam

func (x *NbhInfo) GetRam() float32

func (*NbhInfo) GetTimestamp

func (x *NbhInfo) GetTimestamp() int64

func (*NbhInfo) GetVisitnum

func (x *NbhInfo) GetVisitnum() int32

func (*NbhInfo) ProtoMessage

func (*NbhInfo) ProtoMessage()

func (*NbhInfo) ProtoReflect

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

func (*NbhInfo) Reset

func (x *NbhInfo) Reset()

func (*NbhInfo) String

func (x *NbhInfo) String() string

type Nbhnodes

type Nbhnodes struct {
	Nbh []*NbhInfo `protobuf:"bytes,1,rep,name=nbh,proto3" json:"nbh,omitempty"`
	// contains filtered or unexported fields
}

func (*Nbhnodes) Descriptor deprecated

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

Deprecated: Use Nbhnodes.ProtoReflect.Descriptor instead.

func (*Nbhnodes) GetNbh

func (x *Nbhnodes) GetNbh() []*NbhInfo

func (*Nbhnodes) ProtoMessage

func (*Nbhnodes) ProtoMessage()

func (*Nbhnodes) ProtoReflect

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

func (*Nbhnodes) Reset

func (x *Nbhnodes) Reset()

func (*Nbhnodes) String

func (x *Nbhnodes) String() string

type OnlyAddr

type OnlyAddr struct {
	Addr []string `protobuf:"bytes,1,rep,name=addr,proto3" json:"addr,omitempty"`
	// contains filtered or unexported fields
}

func (*OnlyAddr) Descriptor deprecated

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

Deprecated: Use OnlyAddr.ProtoReflect.Descriptor instead.

func (*OnlyAddr) GetAddr

func (x *OnlyAddr) GetAddr() []string

func (*OnlyAddr) ProtoMessage

func (*OnlyAddr) ProtoMessage()

func (*OnlyAddr) ProtoReflect

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

func (*OnlyAddr) Reset

func (x *OnlyAddr) Reset()

func (*OnlyAddr) String

func (x *OnlyAddr) String() string

type UnimplementedGcsGrpcServer

type UnimplementedGcsGrpcServer struct {
}

UnimplementedGcsGrpcServer should be embedded to have forward compatible implementations.

func (UnimplementedGcsGrpcServer) GetAllNodes

func (UnimplementedGcsGrpcServer) GetNbh

func (UnimplementedGcsGrpcServer) GetOnlyAddr

type UnsafeGcsGrpcServer

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

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

Jump to

Keyboard shortcuts

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