Documentation
¶
Index ¶
- func AddDeleteMergedBranchesCmd(rootCmd *cobra.Command)
- func AddGrpcCmd(rootCmd *cobra.Command)
- func DeleteMergedBranches(req *DeleteMergedBranchesReq) error
- func GrpcMain(req *GrpcMainReq) error
- func NewGrpcClient(conf *GrpcClientConfig) (*grpc.ClientConn, error)
- type Codec
- type DeleteMergedBranchesReq
- type GrpcClientConfig
- type GrpcMainReq
- type RawCodec
- type ReflectionClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGrpcCmd ¶
func DeleteMergedBranches ¶
func DeleteMergedBranches(req *DeleteMergedBranchesReq) error
func GrpcMain ¶
func GrpcMain(req *GrpcMainReq) error
func NewGrpcClient ¶
func NewGrpcClient(conf *GrpcClientConfig) (*grpc.ClientConn, error)
Types ¶
type Codec ¶
type Codec interface {
// CreateReqObj builds the Invoke request value (proto.Message or []byte) from body.
CreateReqObj(body []byte) (any, error)
// CreateReplyTarget returns the reply target passed to Invoke (e.g. *dynamicpb.Message or *[]byte).
CreateReplyTarget() any
// GrpcCallOption returns an additional CallOption for the call, or nil to use the default proto codec.
GrpcCallOption() grpc.CallOption
// GetResponseOutput converts the Invoke reply into bytes to write to stdout; may return nil for empty responses.
GetResponseOutput(resp any) ([]byte, error)
}
Codec abstracts request construction, response parsing, and gRPC call options for sendRequest.
type DeleteMergedBranchesReq ¶
type DeleteMergedBranchesReq struct {
DryRun bool
}
type GrpcClientConfig ¶
type GrpcMainReq ¶
type GrpcMainReq struct {
Host string
Body string
Method string
SubType string
Query string
Svr string
TLS bool
InitialConnWindowSize int32 // 0: omit WithInitialConnWindowSize
InitialWindowSize int32 // 0: omit WithInitialWindowSize
Count int // number of times to send the request; default 1
Headers []string // "key: value" pairs sent as gRPC metadata
}
func (*GrpcMainReq) Validate ¶
func (r *GrpcMainReq) Validate() error
type RawCodec ¶
type RawCodec struct {
// contains filtered or unexported fields
}
RawCodec is a gRPC codec that passes bytes through without marshaling.
func NewRawCodec ¶
type ReflectionClient ¶
type ReflectionClient interface {
ListServices(ctx context.Context) ([]string, error)
ListMethods(ctx context.Context, service string) ([]string, error)
GetFileDescriptorsBySymbol(ctx context.Context, symbol string) ([]*descriptorpb.FileDescriptorProto, error)
Close() error
}
func NewReflectionClient ¶
func NewReflectionClient(ctx context.Context, conf *GrpcClientConfig) (ReflectionClient, error)
NewReflectionClient tries v1 and v1alpha with independent connections, returns the first that succeeds, or both errors if both fail.
Click to show internal directories.
Click to hide internal directories.