Documentation ¶
Index ¶
- type GitalyCommand
- func (gc *GitalyCommand) LogExecution(ctx context.Context, repository *pb.Repository, env sshenv.Env)
- func (gc *GitalyCommand) PrepareContext(ctx context.Context, repository *pb.Repository, env sshenv.Env) (context.Context, context.CancelFunc)
- func (gc *GitalyCommand) RunGitalyCommand(ctx context.Context, handler GitalyHandlerFunc) error
- type GitalyHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitalyCommand ¶
type GitalyCommand struct { Config *config.Config Response *accessverifier.Response Command gitaly.Command }
func NewGitalyCommand ¶
func NewGitalyCommand(cfg *config.Config, serviceName string, response *accessverifier.Response) *GitalyCommand
func (*GitalyCommand) LogExecution ¶
func (gc *GitalyCommand) LogExecution(ctx context.Context, repository *pb.Repository, env sshenv.Env)
func (*GitalyCommand) PrepareContext ¶
func (gc *GitalyCommand) PrepareContext(ctx context.Context, repository *pb.Repository, env sshenv.Env) (context.Context, context.CancelFunc)
PrepareContext wraps a given context with a correlation ID and logs the command to be run.
func (*GitalyCommand) RunGitalyCommand ¶
func (gc *GitalyCommand) RunGitalyCommand(ctx context.Context, handler GitalyHandlerFunc) error
RunGitalyCommand provides a bootstrap for Gitaly commands executed through GitLab-Shell. It ensures that logging, tracing and other common concerns are configured before executing the `handler`.
type GitalyHandlerFunc ¶
GitalyHandlerFunc implementations are responsible for making an appropriate Gitaly call using the provided client and context and returning an error from the Gitaly call.
Click to show internal directories.
Click to hide internal directories.