Documentation ¶
Index ¶
Constants ¶
const ( // OpUnknown = unknown operation type OpUnknown = iota // OpAccessor = accessor operation type (ready only) OpAccessor // OpMutator = mutator operation type (modifies a repository) OpMutator )
const ( // ScopeUnknown is the default scope until determined otherwise ScopeUnknown = iota // ScopeRepository indicates an RPC's scope is limited to a repository ScopeRepository = iota // ScopeStorage indicates an RPC is scoped to an entire storage location ScopeStorage // ScopeServer indicates an RPC is scoped to an entire server ScopeServer )
Variables ¶
This section is empty.
Functions ¶
func ExtractFileDescriptor ¶ added in v1.55.0
func ExtractFileDescriptor(gz []byte) (*descriptor.FileDescriptorProto, error)
ExtractFileDescriptor extracts a FileDescriptorProto from a gzip'd buffer. https://github.com/golang/protobuf/blob/9eb2c01ac278a5d89ce4b2be68fe4500955d8179/descriptor/descriptor.go#L50
Types ¶
type MethodInfo ¶
MethodInfo contains metadata about the RPC method. Refer to documentation for message type "OperationMsg" shared.proto in ./proto for more documentation.
func (MethodInfo) TargetRepo ¶ added in v1.43.0
func (mi MethodInfo) TargetRepo(msg proto.Message) (*gitalypb.Repository, error)
TargetRepo returns the target repository for a protobuf message if it exists
func (MethodInfo) UnmarshalRequestProto ¶ added in v1.56.0
func (mi MethodInfo) UnmarshalRequestProto(b []byte) (proto.Message, error)
UnmarshalRequestProto will unmarshal the bytes into the method's request message type
type Registry ¶
Registry contains info about RPC methods
var ( // GitalyProtoFileDescriptors is a slice of all gitaly registered file // descriptors GitalyProtoFileDescriptors []*descriptor.FileDescriptorProto // GitalyProtoPreregistered is a proto registry pre-registered with all // GitalyProtoFileDescriptors file descriptor protos GitalyProtoPreregistered *Registry )
GitalyProtoFileDescriptors is a slice of all gitaly registered file descriptors
func (*Registry) LookupMethod ¶
func (pr *Registry) LookupMethod(fullMethodName string) (MethodInfo, error)
LookupMethod looks up an MethodInfo by service and method name
func (*Registry) RegisterFiles ¶
func (pr *Registry) RegisterFiles(protos ...*descriptor.FileDescriptorProto) error
RegisterFiles takes one or more descriptor.FileDescriptorProto and populates the registry with its info