Documentation
¶
Index ¶
- Constants
- Variables
- func BuildSubmitQueueGatewayYARPCProcedures(server SubmitQueueGatewayYARPCServer) []transport.Procedure
- func NewFxSubmitQueueGatewayYARPCClient(name string, options ...protobuf.ClientOption) interface{}
- func NewFxSubmitQueueGatewayYARPCProcedures() interface{}
- func RegisterSubmitQueueGatewayServer(s grpc.ServiceRegistrar, srv SubmitQueueGatewayServer)
- type Change
- type Error
- type FxSubmitQueueGatewayYARPCClientParams
- type FxSubmitQueueGatewayYARPCClientResult
- type FxSubmitQueueGatewayYARPCProceduresParams
- type FxSubmitQueueGatewayYARPCProceduresResult
- type LandRequest
- func (*LandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LandRequest) GetChange() *Change
- func (x *LandRequest) GetQueue() string
- func (x *LandRequest) GetStrategy() Strategy
- func (*LandRequest) ProtoMessage()
- func (x *LandRequest) ProtoReflect() protoreflect.Message
- func (x *LandRequest) Reset()
- func (x *LandRequest) String() string
- type LandResponse
- 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 Strategy
- type SubmitQueueGatewayClient
- type SubmitQueueGatewayServer
- type SubmitQueueGatewayYARPCClient
- type SubmitQueueGatewayYARPCServer
- type UnimplementedSubmitQueueGatewayServer
- type UnrecognizedQueueError
- func (*UnrecognizedQueueError) Descriptor() ([]byte, []int)deprecated
- func (x *UnrecognizedQueueError) GetError() *Error
- func (x *UnrecognizedQueueError) GetQueue() string
- func (*UnrecognizedQueueError) ProtoMessage()
- func (x *UnrecognizedQueueError) ProtoReflect() protoreflect.Message
- func (x *UnrecognizedQueueError) Reset()
- func (x *UnrecognizedQueueError) String() string
- type UnsafeSubmitQueueGatewayServer
Constants ¶
const ( SubmitQueueGateway_Ping_FullMethodName = "/uber.submitqueue.gateway.SubmitQueueGateway/Ping" SubmitQueueGateway_Land_FullMethodName = "/uber.submitqueue.gateway.SubmitQueueGateway/Land" )
Variables ¶
var ( Strategy_name = map[int32]string{ 0: "DEFAULT", 1: "REBASE", 2: "SQUASH_REBASE", 3: "MERGE", } Strategy_value = map[string]int32{ "DEFAULT": 0, "REBASE": 1, "SQUASH_REBASE": 2, "MERGE": 3, } )
Enum value maps for Strategy.
var File_gateway_proto protoreflect.FileDescriptor
var SubmitQueueGatewayReflectionMeta = reflection.ServerMeta{
ServiceName: "uber.submitqueue.gateway.SubmitQueueGateway",
FileDescriptors: yarpcFileDescriptorClosuref1a937782ebbded5,
}
SubmitQueueGatewayReflectionMeta is the reflection server metadata required for using the gRPC reflection protocol with YARPC.
See https://github.com/grpc/grpc/blob/master/doc/server-reflection.md.
var SubmitQueueGateway_ServiceDesc = grpc.ServiceDesc{ ServiceName: "uber.submitqueue.gateway.SubmitQueueGateway", HandlerType: (*SubmitQueueGatewayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _SubmitQueueGateway_Ping_Handler, }, { MethodName: "Land", Handler: _SubmitQueueGateway_Land_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gateway.proto", }
SubmitQueueGateway_ServiceDesc is the grpc.ServiceDesc for SubmitQueueGateway service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func BuildSubmitQueueGatewayYARPCProcedures ¶
func BuildSubmitQueueGatewayYARPCProcedures(server SubmitQueueGatewayYARPCServer) []transport.Procedure
BuildSubmitQueueGatewayYARPCProcedures prepares an implementation of the SubmitQueueGateway service for YARPC registration.
func NewFxSubmitQueueGatewayYARPCClient ¶
func NewFxSubmitQueueGatewayYARPCClient(name string, options ...protobuf.ClientOption) interface{}
NewFxSubmitQueueGatewayYARPCClient provides a SubmitQueueGatewayYARPCClient to an Fx application using the given name for routing.
fx.Provide(
protopb.NewFxSubmitQueueGatewayYARPCClient("service-name"),
...
)
func NewFxSubmitQueueGatewayYARPCProcedures ¶
func NewFxSubmitQueueGatewayYARPCProcedures() interface{}
NewFxSubmitQueueGatewayYARPCProcedures provides SubmitQueueGatewayYARPCServer procedures to an Fx application. It expects a SubmitQueueGatewayYARPCServer to be present in the container.
fx.Provide( protopb.NewFxSubmitQueueGatewayYARPCProcedures(), ... )
func RegisterSubmitQueueGatewayServer ¶
func RegisterSubmitQueueGatewayServer(s grpc.ServiceRegistrar, srv SubmitQueueGatewayServer)
Types ¶
type Change ¶
type Change struct {
// URIs identifying the change(s) to land (RFC 3986 compliant).
// The scheme identifies the change provider, and the path contains provider-specific resource identifiers.
//
// GitHub is supported by default (though other providers can be added):
//
// Template: "github://<org>/<repo>/pull/<pr>/<hash>"
// Example: "github://uber/submitqueue/pull/123/abc123def"
//
// SubmitQueue guarantees changes are landed in order with no other changes in between.
// SubmitQueue does not guarantee each change is individually valid, but produces a validity marker on such changes.
// The user is responsible for including all changes in a stack in order, starting from the earliest change.
Uris []string `protobuf:"bytes,1,rep,name=uris,proto3" json:"uris,omitempty"`
// contains filtered or unexported fields
}
Change represents a code change identified by URIs from a code change provider (e.g., GitHub Pull Request, Phabricator Diff). The provider is extracted from the URI scheme.
func (*Change) Descriptor
deprecated
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
func (*Change) ProtoReflect ¶
func (x *Change) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct {
// Free text error message describing the error.
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Generic error with metadata. Each custom error type should extend this message.
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type FxSubmitQueueGatewayYARPCClientParams ¶
type FxSubmitQueueGatewayYARPCClientParams struct {
fx.In
Provider yarpc.ClientConfig
AnyResolver jsonpb.AnyResolver `name:"yarpcfx" optional:"true"`
Restriction restriction.Checker `optional:"true"`
}
FxSubmitQueueGatewayYARPCClientParams defines the input for NewFxSubmitQueueGatewayYARPCClient. It provides the paramaters to get a SubmitQueueGatewayYARPCClient in an Fx application.
type FxSubmitQueueGatewayYARPCClientResult ¶
type FxSubmitQueueGatewayYARPCClientResult struct {
fx.Out
Client SubmitQueueGatewayYARPCClient
}
FxSubmitQueueGatewayYARPCClientResult defines the output of NewFxSubmitQueueGatewayYARPCClient. It provides a SubmitQueueGatewayYARPCClient to an Fx application.
type FxSubmitQueueGatewayYARPCProceduresParams ¶
type FxSubmitQueueGatewayYARPCProceduresParams struct {
fx.In
Server SubmitQueueGatewayYARPCServer
AnyResolver jsonpb.AnyResolver `name:"yarpcfx" optional:"true"`
}
FxSubmitQueueGatewayYARPCProceduresParams defines the input for NewFxSubmitQueueGatewayYARPCProcedures. It provides the paramaters to get SubmitQueueGatewayYARPCServer procedures in an Fx application.
type FxSubmitQueueGatewayYARPCProceduresResult ¶
type FxSubmitQueueGatewayYARPCProceduresResult struct {
fx.Out
Procedures []transport.Procedure `group:"yarpcfx"`
ReflectionMeta reflection.ServerMeta `group:"yarpcfx"`
}
FxSubmitQueueGatewayYARPCProceduresResult defines the output of NewFxSubmitQueueGatewayYARPCProcedures. It provides SubmitQueueGatewayYARPCServer 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 LandRequest ¶
type LandRequest struct {
// Name of the queue processing the land request. The queue should be defined in the configuration, otherwise an error is returned.
Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"`
// Change (such as a pull request) to land into the target branch. Target branch is defined by the queue configuration.
Change *Change `protobuf:"bytes,2,opt,name=change,proto3" json:"change,omitempty"`
// Source control integration strategy to use for this land operation. If not specified, the default queue strategy is used.
Strategy Strategy `protobuf:"varint,4,opt,name=strategy,proto3,enum=uber.submitqueue.gateway.Strategy" json:"strategy,omitempty"`
// contains filtered or unexported fields
}
LandRequest defines a request to land (merge into target branch of the source control repository) a set of code changes.
func (*LandRequest) Descriptor
deprecated
func (*LandRequest) Descriptor() ([]byte, []int)
Deprecated: Use LandRequest.ProtoReflect.Descriptor instead.
func (*LandRequest) GetChange ¶
func (x *LandRequest) GetChange() *Change
func (*LandRequest) GetQueue ¶
func (x *LandRequest) GetQueue() string
func (*LandRequest) GetStrategy ¶
func (x *LandRequest) GetStrategy() Strategy
func (*LandRequest) ProtoMessage ¶
func (*LandRequest) ProtoMessage()
func (*LandRequest) ProtoReflect ¶
func (x *LandRequest) ProtoReflect() protoreflect.Message
func (*LandRequest) Reset ¶
func (x *LandRequest) Reset()
func (*LandRequest) String ¶
func (x *LandRequest) String() string
type LandResponse ¶
type LandResponse struct {
// Globally unique identifier for the land request. Used to track the land request lifecycle.
Sqid string `protobuf:"bytes,1,opt,name=sqid,proto3" json:"sqid,omitempty"`
// contains filtered or unexported fields
}
LandResponse defines the response to a land request.
func (*LandResponse) Descriptor
deprecated
func (*LandResponse) Descriptor() ([]byte, []int)
Deprecated: Use LandResponse.ProtoReflect.Descriptor instead.
func (*LandResponse) GetSqid ¶
func (x *LandResponse) GetSqid() string
func (*LandResponse) ProtoMessage ¶
func (*LandResponse) ProtoMessage()
func (*LandResponse) ProtoReflect ¶
func (x *LandResponse) ProtoReflect() protoreflect.Message
func (*LandResponse) Reset ¶
func (x *LandResponse) Reset()
func (*LandResponse) String ¶
func (x *LandResponse) String() string
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 Strategy ¶
type Strategy int32
Strategy defines the possible source control integration methods
const ( // Default strategy (let server decide based on configuration) Strategy_DEFAULT Strategy = 0 // Rebase commits onto target branch before landing Strategy_REBASE Strategy = 1 // Same as REBASE but squash commits into a single commit before rebase Strategy_SQUASH_REBASE Strategy = 2 // Merge commits into the target branch by creating a separate merge commit, preserving the commit history along with hashes Strategy_MERGE Strategy = 3 )
func (Strategy) Descriptor ¶
func (Strategy) Descriptor() protoreflect.EnumDescriptor
func (Strategy) EnumDescriptor
deprecated
func (Strategy) Number ¶
func (x Strategy) Number() protoreflect.EnumNumber
func (Strategy) Type ¶
func (Strategy) Type() protoreflect.EnumType
type SubmitQueueGatewayClient ¶
type SubmitQueueGatewayClient interface {
// Ping returns a response indicating the service is alive
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
// Land lands a set of code changes into a target branch, performing the necessary validations across all other changes in the queue.
// The processing is asynchronous and returns a LandResponse immediately. The land request is processed in the background.
Land(ctx context.Context, in *LandRequest, opts ...grpc.CallOption) (*LandResponse, error)
}
SubmitQueueGatewayClient is the client API for SubmitQueueGateway 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.
SubmitQueueGateway provides the gateway API
func NewSubmitQueueGatewayClient ¶
func NewSubmitQueueGatewayClient(cc grpc.ClientConnInterface) SubmitQueueGatewayClient
type SubmitQueueGatewayServer ¶
type SubmitQueueGatewayServer interface {
// Ping returns a response indicating the service is alive
Ping(context.Context, *PingRequest) (*PingResponse, error)
// Land lands a set of code changes into a target branch, performing the necessary validations across all other changes in the queue.
// The processing is asynchronous and returns a LandResponse immediately. The land request is processed in the background.
Land(context.Context, *LandRequest) (*LandResponse, error)
// contains filtered or unexported methods
}
SubmitQueueGatewayServer is the server API for SubmitQueueGateway service. All implementations must embed UnimplementedSubmitQueueGatewayServer for forward compatibility.
SubmitQueueGateway provides the gateway API
type SubmitQueueGatewayYARPCClient ¶
type SubmitQueueGatewayYARPCClient interface {
Ping(context.Context, *PingRequest, ...yarpc.CallOption) (*PingResponse, error)
Land(context.Context, *LandRequest, ...yarpc.CallOption) (*LandResponse, error)
}
SubmitQueueGatewayYARPCClient is the YARPC client-side interface for the SubmitQueueGateway service.
func NewSubmitQueueGatewayYARPCClient ¶
func NewSubmitQueueGatewayYARPCClient(clientConfig transport.ClientConfig, options ...protobuf.ClientOption) SubmitQueueGatewayYARPCClient
NewSubmitQueueGatewayYARPCClient builds a new YARPC client for the SubmitQueueGateway service.
type SubmitQueueGatewayYARPCServer ¶
type SubmitQueueGatewayYARPCServer interface {
Ping(context.Context, *PingRequest) (*PingResponse, error)
Land(context.Context, *LandRequest) (*LandResponse, error)
}
SubmitQueueGatewayYARPCServer is the YARPC server-side interface for the SubmitQueueGateway service.
type UnimplementedSubmitQueueGatewayServer ¶
type UnimplementedSubmitQueueGatewayServer struct{}
UnimplementedSubmitQueueGatewayServer 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 (UnimplementedSubmitQueueGatewayServer) Land ¶
func (UnimplementedSubmitQueueGatewayServer) Land(context.Context, *LandRequest) (*LandResponse, error)
func (UnimplementedSubmitQueueGatewayServer) Ping ¶
func (UnimplementedSubmitQueueGatewayServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
type UnrecognizedQueueError ¶
type UnrecognizedQueueError struct {
// Free text error message describing the error.
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
// Name of the queue that was not recognized.
Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"`
// contains filtered or unexported fields
}
UnrecognizedQueueError is returned when a queue name is not recognized. Typically this indicates a typo in the queue name or server misconfiguration.
func (*UnrecognizedQueueError) Descriptor
deprecated
func (*UnrecognizedQueueError) Descriptor() ([]byte, []int)
Deprecated: Use UnrecognizedQueueError.ProtoReflect.Descriptor instead.
func (*UnrecognizedQueueError) GetError ¶
func (x *UnrecognizedQueueError) GetError() *Error
func (*UnrecognizedQueueError) GetQueue ¶
func (x *UnrecognizedQueueError) GetQueue() string
func (*UnrecognizedQueueError) ProtoMessage ¶
func (*UnrecognizedQueueError) ProtoMessage()
func (*UnrecognizedQueueError) ProtoReflect ¶
func (x *UnrecognizedQueueError) ProtoReflect() protoreflect.Message
func (*UnrecognizedQueueError) Reset ¶
func (x *UnrecognizedQueueError) Reset()
func (*UnrecognizedQueueError) String ¶
func (x *UnrecognizedQueueError) String() string
type UnsafeSubmitQueueGatewayServer ¶
type UnsafeSubmitQueueGatewayServer interface {
// contains filtered or unexported methods
}
UnsafeSubmitQueueGatewayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SubmitQueueGatewayServer will result in compilation errors.