Documentation ¶
Index ¶
- Variables
- type MethodInfo
- func (mi MethodInfo) AdditionalRepo(msg proto.Message) (*gitalypb.Repository, bool, error)
- func (mi MethodInfo) FullMethodName() string
- func (mi MethodInfo) SetStorage(msg proto.Message, storage string) error
- func (mi MethodInfo) Storage(msg proto.Message) (string, error)
- func (mi MethodInfo) TargetRepo(msg proto.Message) (*gitalypb.Repository, error)
- func (mi MethodInfo) UnmarshalRequestProto(b []byte) (proto.Message, error)
- type OpType
- type Registry
- type Scope
Constants ¶
This section is empty.
Variables ¶
var ErrProtoFieldEmpty = errors.New("proto field is empty")
ErrProtoFieldEmpty indicates the protobuf field is empty
var ErrTargetRepoMissing = errors.New("empty Repository")
ErrTargetRepoMissing indicates that the target repo is missing or not set
Functions ¶
This section is empty.
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) AdditionalRepo ¶
func (mi MethodInfo) AdditionalRepo(msg proto.Message) (*gitalypb.Repository, bool, error)
AdditionalRepo returns the additional repository for a protobuf message that needs a storage rewritten if it exists
func (MethodInfo) FullMethodName ¶
func (mi MethodInfo) FullMethodName() string
nolint: revive,stylecheck // This is unintentionally missing documentation.
func (MethodInfo) SetStorage ¶
func (mi MethodInfo) SetStorage(msg proto.Message, storage string) error
SetStorage sets the storage name for a protobuf message
func (MethodInfo) Storage ¶
func (mi MethodInfo) Storage(msg proto.Message) (string, error)
Storage returns the storage name for a protobuf message if it exists
func (MethodInfo) TargetRepo ¶
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 ¶
func (mi MethodInfo) UnmarshalRequestProto(b []byte) (proto.Message, error)
UnmarshalRequestProto will unmarshal the bytes into the method's request message type
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry contains info about RPC methods
var GitalyProtoPreregistered *Registry
GitalyProtoPreregistered is a proto registry pre-registered with all gitalypb.GitalyProtos proto files.
func New ¶
func New(protos ...*descriptorpb.FileDescriptorProto) (*Registry, error)
New creates a new ProtoRegistry with info from one or more descriptor.FileDescriptorProto
func NewFromPaths ¶ added in v14.1.0
NewFromPaths returns a new Registry, initialized with the contents of the provided files.
func (*Registry) IsInterceptedMethod ¶
IsInterceptedMethod returns whether Praefect intercepts the method call instead of proxying it.
func (*Registry) LookupMethod ¶
func (pr *Registry) LookupMethod(fullMethodName string) (MethodInfo, error)
LookupMethod looks up an MethodInfo by service and method name
func (*Registry) Methods ¶
func (pr *Registry) Methods() []MethodInfo
Methods returns all registered methods