Documentation
¶
Index ¶
- Constants
- Variables
- func BuildRunwayYARPCProcedures(server RunwayYARPCServer) []transport.Procedure
- func NewFxRunwayYARPCClient(name string, options ...v2.ClientOption) interface{}
- func NewFxRunwayYARPCProcedures() interface{}
- func RegisterRunwayServer(s grpc.ServiceRegistrar, srv RunwayServer)
- type FxRunwayYARPCClientParams
- type FxRunwayYARPCClientResult
- type FxRunwayYARPCProceduresParams
- type FxRunwayYARPCProceduresResult
- type PingRequest
- type PingResponse
- func (*PingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PingResponse) GetHostname() string
- func (x *PingResponse) GetMessage() string
- func (x *PingResponse) GetServiceName() string
- func (x *PingResponse) GetTimestamp() int64
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) String() string
- type RunwayClient
- type RunwayServer
- type RunwayYARPCClient
- type RunwayYARPCServer
- type UnimplementedRunwayServer
- type UnsafeRunwayServer
Constants ¶
const (
Runway_Ping_FullMethodName = "/uber.runway.Runway/Ping"
)
Variables ¶
var File_runway_proto protoreflect.FileDescriptor
var Runway_ServiceDesc = grpc.ServiceDesc{ ServiceName: "uber.runway.Runway", HandlerType: (*RunwayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Runway_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "runway.proto", }
Runway_ServiceDesc is the grpc.ServiceDesc for Runway service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func BuildRunwayYARPCProcedures ¶
func BuildRunwayYARPCProcedures(server RunwayYARPCServer) []transport.Procedure
BuildRunwayYARPCProcedures prepares an implementation of the Runway service for YARPC registration.
func NewFxRunwayYARPCClient ¶
func NewFxRunwayYARPCClient(name string, options ...v2.ClientOption) interface{}
NewFxRunwayYARPCClient provides a RunwayYARPCClient to an Fx application using the given name for routing.
fx.Provide(
protopb.NewFxRunwayYARPCClient("service-name"),
...
)
func NewFxRunwayYARPCProcedures ¶
func NewFxRunwayYARPCProcedures() interface{}
NewFxRunwayYARPCProcedures provides RunwayYARPCServer procedures to an Fx application. It expects a RunwayYARPCServer to be present in the container.
fx.Provide( protopb.NewFxRunwayYARPCProcedures(), ... )
func RegisterRunwayServer ¶
func RegisterRunwayServer(s grpc.ServiceRegistrar, srv RunwayServer)
Types ¶
type FxRunwayYARPCClientParams ¶
type FxRunwayYARPCClientParams struct {
fx.In
Provider yarpc.ClientConfig
AnyResolver v2.AnyResolver `name:"yarpcfx" optional:"true"`
Restriction restriction.Checker `optional:"true"`
}
FxRunwayYARPCClientParams defines the input for NewFxRunwayYARPCClient. It provides the paramaters to get a RunwayYARPCClient in an Fx application.
type FxRunwayYARPCClientResult ¶
type FxRunwayYARPCClientResult struct {
fx.Out
Client RunwayYARPCClient
}
FxRunwayYARPCClientResult defines the output of NewFxRunwayYARPCClient. It provides a RunwayYARPCClient to an Fx application.
type FxRunwayYARPCProceduresParams ¶
type FxRunwayYARPCProceduresParams struct {
fx.In
Server RunwayYARPCServer
AnyResolver v2.AnyResolver `name:"yarpcfx" optional:"true"`
}
FxRunwayYARPCProceduresParams defines the input for NewFxRunwayYARPCProcedures. It provides the paramaters to get RunwayYARPCServer procedures in an Fx application.
type FxRunwayYARPCProceduresResult ¶
type FxRunwayYARPCProceduresResult struct {
fx.Out
Procedures []transport.Procedure `group:"yarpcfx"`
ReflectionMeta reflection.ServerMeta `group:"yarpcfx"`
}
FxRunwayYARPCProceduresResult defines the output of NewFxRunwayYARPCProcedures. It provides RunwayYARPCServer procedures to an Fx application.
The procedures are provided to the "yarpcfx" value group. Dig 1.2 or newer must be used for this feature to work.
type PingRequest ¶
type PingRequest struct {
// Optional message to include in the ping
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
PingRequest is the request for the Ping method
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetMessage ¶
func (x *PingRequest) GetMessage() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
// The response message
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// The service name that handled the request
ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
// Timestamp of when the ping was received
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Hostname of the server that handled the request
Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"`
// contains filtered or unexported fields
}
PingResponse is the response for the Ping method
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetHostname ¶
func (x *PingResponse) GetHostname() string
func (*PingResponse) GetMessage ¶
func (x *PingResponse) GetMessage() string
func (*PingResponse) GetServiceName ¶
func (x *PingResponse) GetServiceName() string
func (*PingResponse) GetTimestamp ¶
func (x *PingResponse) GetTimestamp() int64
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type RunwayClient ¶
type RunwayClient interface {
// Ping returns a response indicating the service is alive
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}
RunwayClient is the client API for Runway 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.
Runway provides the Runway service API.
func NewRunwayClient ¶
func NewRunwayClient(cc grpc.ClientConnInterface) RunwayClient
type RunwayServer ¶
type RunwayServer interface {
// Ping returns a response indicating the service is alive
Ping(context.Context, *PingRequest) (*PingResponse, error)
// contains filtered or unexported methods
}
RunwayServer is the server API for Runway service. All implementations must embed UnimplementedRunwayServer for forward compatibility.
Runway provides the Runway service API.
type RunwayYARPCClient ¶
type RunwayYARPCClient interface {
Ping(context.Context, *PingRequest, ...yarpc.CallOption) (*PingResponse, error)
}
RunwayYARPCClient is the YARPC client-side interface for the Runway service.
func NewRunwayYARPCClient ¶
func NewRunwayYARPCClient(clientConfig transport.ClientConfig, options ...v2.ClientOption) RunwayYARPCClient
NewRunwayYARPCClient builds a new YARPC client for the Runway service.
type RunwayYARPCServer ¶
type RunwayYARPCServer interface {
Ping(context.Context, *PingRequest) (*PingResponse, error)
}
RunwayYARPCServer is the YARPC server-side interface for the Runway service.
type UnimplementedRunwayServer ¶
type UnimplementedRunwayServer struct{}
UnimplementedRunwayServer 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 (UnimplementedRunwayServer) Ping ¶
func (UnimplementedRunwayServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
type UnsafeRunwayServer ¶
type UnsafeRunwayServer interface {
// contains filtered or unexported methods
}
UnsafeRunwayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RunwayServer will result in compilation errors.