Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProberServer(s grpc.ServiceRegistrar, srv ProberServer)
- type BlobReadRequest
- type BlobReadResponse
- type BlobWriteRequest
- type BlobWriteResponse
- type EchoMessage
- type ProberClient
- type ProberServer
- type ServerConf
- func (*ServerConf) Descriptor() ([]byte, []int)deprecated
- func (x *ServerConf) GetEnableReflection() bool
- func (x *ServerConf) GetPort() int32
- func (x *ServerConf) GetUseDedicatedServer() bool
- func (*ServerConf) ProtoMessage()
- func (x *ServerConf) ProtoReflect() protoreflect.Message
- func (x *ServerConf) Reset()
- func (x *ServerConf) String() string
- type StatusRequest
- type StatusResponse
- type UnimplementedProberServer
- func (UnimplementedProberServer) BlobRead(context.Context, *BlobReadRequest) (*BlobReadResponse, error)
- func (UnimplementedProberServer) BlobWrite(context.Context, *BlobWriteRequest) (*BlobWriteResponse, error)
- func (UnimplementedProberServer) Echo(context.Context, *EchoMessage) (*EchoMessage, error)
- func (UnimplementedProberServer) ServerStatus(context.Context, *StatusRequest) (*StatusResponse, error)
- type UnsafeProberServer
Constants ¶
const ( Default_ServerConf_Port = int32(3142) Default_ServerConf_EnableReflection = bool(false) Default_ServerConf_UseDedicatedServer = bool(true) )
Default values for ServerConf fields.
const ( Prober_Echo_FullMethodName = "/cloudprober.servers.grpc.Prober/Echo" Prober_BlobRead_FullMethodName = "/cloudprober.servers.grpc.Prober/BlobRead" Prober_ServerStatus_FullMethodName = "/cloudprober.servers.grpc.Prober/ServerStatus" Prober_BlobWrite_FullMethodName = "/cloudprober.servers.grpc.Prober/BlobWrite" )
Variables ¶
var File_github_com_cloudprober_cloudprober_internal_servers_grpc_proto_config_proto protoreflect.FileDescriptor
var File_github_com_cloudprober_cloudprober_internal_servers_grpc_proto_grpcservice_proto protoreflect.FileDescriptor
var Prober_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cloudprober.servers.grpc.Prober", HandlerType: (*ProberServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _Prober_Echo_Handler, }, { MethodName: "BlobRead", Handler: _Prober_BlobRead_Handler, }, { MethodName: "ServerStatus", Handler: _Prober_ServerStatus_Handler, }, { MethodName: "BlobWrite", Handler: _Prober_BlobWrite_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/cloudprober/cloudprober/internal/servers/grpc/proto/grpcservice.proto", }
Prober_ServiceDesc is the grpc.ServiceDesc for Prober service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProberServer ¶
func RegisterProberServer(s grpc.ServiceRegistrar, srv ProberServer)
Types ¶
type BlobReadRequest ¶
type BlobReadRequest struct { Size *int32 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` // contains filtered or unexported fields }
func (*BlobReadRequest) Descriptor
deprecated
func (*BlobReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlobReadRequest.ProtoReflect.Descriptor instead.
func (*BlobReadRequest) GetSize ¶
func (x *BlobReadRequest) GetSize() int32
func (*BlobReadRequest) ProtoMessage ¶
func (*BlobReadRequest) ProtoMessage()
func (*BlobReadRequest) ProtoReflect ¶
func (x *BlobReadRequest) ProtoReflect() protoreflect.Message
func (*BlobReadRequest) Reset ¶
func (x *BlobReadRequest) Reset()
func (*BlobReadRequest) String ¶
func (x *BlobReadRequest) String() string
type BlobReadResponse ¶
type BlobReadResponse struct { Blob []byte `protobuf:"bytes,1,opt,name=blob" json:"blob,omitempty"` // contains filtered or unexported fields }
func (*BlobReadResponse) Descriptor
deprecated
func (*BlobReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use BlobReadResponse.ProtoReflect.Descriptor instead.
func (*BlobReadResponse) GetBlob ¶
func (x *BlobReadResponse) GetBlob() []byte
func (*BlobReadResponse) ProtoMessage ¶
func (*BlobReadResponse) ProtoMessage()
func (*BlobReadResponse) ProtoReflect ¶
func (x *BlobReadResponse) ProtoReflect() protoreflect.Message
func (*BlobReadResponse) Reset ¶
func (x *BlobReadResponse) Reset()
func (*BlobReadResponse) String ¶
func (x *BlobReadResponse) String() string
type BlobWriteRequest ¶
type BlobWriteRequest struct { Blob []byte `protobuf:"bytes,1,opt,name=blob" json:"blob,omitempty"` // contains filtered or unexported fields }
func (*BlobWriteRequest) Descriptor
deprecated
func (*BlobWriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlobWriteRequest.ProtoReflect.Descriptor instead.
func (*BlobWriteRequest) GetBlob ¶
func (x *BlobWriteRequest) GetBlob() []byte
func (*BlobWriteRequest) ProtoMessage ¶
func (*BlobWriteRequest) ProtoMessage()
func (*BlobWriteRequest) ProtoReflect ¶
func (x *BlobWriteRequest) ProtoReflect() protoreflect.Message
func (*BlobWriteRequest) Reset ¶
func (x *BlobWriteRequest) Reset()
func (*BlobWriteRequest) String ¶
func (x *BlobWriteRequest) String() string
type BlobWriteResponse ¶
type BlobWriteResponse struct { Size *int32 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` // contains filtered or unexported fields }
func (*BlobWriteResponse) Descriptor
deprecated
func (*BlobWriteResponse) Descriptor() ([]byte, []int)
Deprecated: Use BlobWriteResponse.ProtoReflect.Descriptor instead.
func (*BlobWriteResponse) GetSize ¶
func (x *BlobWriteResponse) GetSize() int32
func (*BlobWriteResponse) ProtoMessage ¶
func (*BlobWriteResponse) ProtoMessage()
func (*BlobWriteResponse) ProtoReflect ¶
func (x *BlobWriteResponse) ProtoReflect() protoreflect.Message
func (*BlobWriteResponse) Reset ¶
func (x *BlobWriteResponse) Reset()
func (*BlobWriteResponse) String ¶
func (x *BlobWriteResponse) String() string
type EchoMessage ¶
type EchoMessage struct { Blob []byte `protobuf:"bytes,1,opt,name=blob" json:"blob,omitempty"` // contains filtered or unexported fields }
func (*EchoMessage) Descriptor
deprecated
func (*EchoMessage) Descriptor() ([]byte, []int)
Deprecated: Use EchoMessage.ProtoReflect.Descriptor instead.
func (*EchoMessage) GetBlob ¶
func (x *EchoMessage) GetBlob() []byte
func (*EchoMessage) ProtoMessage ¶
func (*EchoMessage) ProtoMessage()
func (*EchoMessage) ProtoReflect ¶
func (x *EchoMessage) ProtoReflect() protoreflect.Message
func (*EchoMessage) Reset ¶
func (x *EchoMessage) Reset()
func (*EchoMessage) String ¶
func (x *EchoMessage) String() string
type ProberClient ¶
type ProberClient interface { // Echo echoes back incoming messages. Echo(ctx context.Context, in *EchoMessage, opts ...grpc.CallOption) (*EchoMessage, error) // BlobRead returns a blob of bytes to the prober. BlobRead(ctx context.Context, in *BlobReadRequest, opts ...grpc.CallOption) (*BlobReadResponse, error) // ServerStatus returns the current server status. ServerStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) // BlobWrite allows client to write a blob to the server. BlobWrite(ctx context.Context, in *BlobWriteRequest, opts ...grpc.CallOption) (*BlobWriteResponse, error) }
ProberClient is the client API for Prober 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 NewProberClient ¶
func NewProberClient(cc grpc.ClientConnInterface) ProberClient
type ProberServer ¶
type ProberServer interface { // Echo echoes back incoming messages. Echo(context.Context, *EchoMessage) (*EchoMessage, error) // BlobRead returns a blob of bytes to the prober. BlobRead(context.Context, *BlobReadRequest) (*BlobReadResponse, error) // ServerStatus returns the current server status. ServerStatus(context.Context, *StatusRequest) (*StatusResponse, error) // BlobWrite allows client to write a blob to the server. BlobWrite(context.Context, *BlobWriteRequest) (*BlobWriteResponse, error) // contains filtered or unexported methods }
ProberServer is the server API for Prober service. All implementations must embed UnimplementedProberServer for forward compatibility.
type ServerConf ¶
type ServerConf struct { Port *int32 `protobuf:"varint,1,opt,name=port,def=3142" json:"port,omitempty"` // Enables gRPC reflection for publicly visible services, allowing grpc_cli to // work. See https://grpc.io/grpc/core/md_doc_server_reflection_tutorial.html. EnableReflection *bool `protobuf:"varint,2,opt,name=enable_reflection,json=enableReflection,def=0" json:"enable_reflection,omitempty"` // If use_dedicated_server is set to true, then create a new gRPC server // to handle probes. Otherwise, attempt to reuse gRPC server from runconfig // if that was set. UseDedicatedServer *bool `protobuf:"varint,3,opt,name=use_dedicated_server,json=useDedicatedServer,def=1" json:"use_dedicated_server,omitempty"` // contains filtered or unexported fields }
func (*ServerConf) Descriptor
deprecated
func (*ServerConf) Descriptor() ([]byte, []int)
Deprecated: Use ServerConf.ProtoReflect.Descriptor instead.
func (*ServerConf) GetEnableReflection ¶
func (x *ServerConf) GetEnableReflection() bool
func (*ServerConf) GetPort ¶
func (x *ServerConf) GetPort() int32
func (*ServerConf) GetUseDedicatedServer ¶
func (x *ServerConf) GetUseDedicatedServer() bool
func (*ServerConf) ProtoMessage ¶
func (*ServerConf) ProtoMessage()
func (*ServerConf) ProtoReflect ¶
func (x *ServerConf) ProtoReflect() protoreflect.Message
func (*ServerConf) Reset ¶
func (x *ServerConf) Reset()
func (*ServerConf) String ¶
func (x *ServerConf) String() string
type StatusRequest ¶
type StatusRequest struct { ClientName *string `protobuf:"bytes,1,opt,name=client_name,json=clientName" json:"client_name,omitempty"` // contains filtered or unexported fields }
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) GetClientName ¶
func (x *StatusRequest) GetClientName() string
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type StatusResponse ¶
type StatusResponse struct { UptimeUs *int64 `protobuf:"varint,1,opt,name=uptime_us,json=uptimeUs" json:"uptime_us,omitempty"` // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetUptimeUs ¶
func (x *StatusResponse) GetUptimeUs() int64
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type UnimplementedProberServer ¶
type UnimplementedProberServer struct{}
UnimplementedProberServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedProberServer) BlobRead ¶
func (UnimplementedProberServer) BlobRead(context.Context, *BlobReadRequest) (*BlobReadResponse, error)
func (UnimplementedProberServer) BlobWrite ¶
func (UnimplementedProberServer) BlobWrite(context.Context, *BlobWriteRequest) (*BlobWriteResponse, error)
func (UnimplementedProberServer) Echo ¶
func (UnimplementedProberServer) Echo(context.Context, *EchoMessage) (*EchoMessage, error)
func (UnimplementedProberServer) ServerStatus ¶
func (UnimplementedProberServer) ServerStatus(context.Context, *StatusRequest) (*StatusResponse, error)
type UnsafeProberServer ¶
type UnsafeProberServer interface {
// contains filtered or unexported methods
}
UnsafeProberServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProberServer will result in compilation errors.