pipeline_api

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHandler

func CreateHandler(allocationCh chan runnermanager.RunnerAllocationRequest, releaseCh chan runnermanager.RunnerReleaseRequest, mux *http.ServeMux)

Types

type ApiServer

type ApiServer struct {
	// contains filtered or unexported fields
}

func (*ApiServer) AddRunnerToMap added in v0.2.0

func (s *ApiServer) AddRunnerToMap(u uuid.UUID, runner *runnermanager.Runner)

func (*ApiServer) GetRunner

func (s *ApiServer) GetRunner(
	ctx context.Context,
	req *connect.Request[apiv2.GetRunnerRequest],
) (*connect.Response[apiv2.GetRunnerResponse], error)

func (*ApiServer) GetRunnerFromMap

func (s *ApiServer) GetRunnerFromMap(u uuid.UUID) (*RunnerWrapper, bool)

func (*ApiServer) ReleaseRunner

func (s *ApiServer) ReleaseRunner(
	ctx context.Context,
	req *connect.Request[apiv2.ReleaseRunnerRequest],
) (*connect.Response[apiv2.ReleaseRunnerResponse], error)

func (*ApiServer) RunCommand

func (s *ApiServer) RunCommand(
	ctx context.Context,
	req *connect.Request[apiv2.RunCommandRequest],
) (*connect.Response[apiv2.RunCommandResponse], error)

type RunnerWrapper

type RunnerWrapper struct {
	// contains filtered or unexported fields
}

func (*RunnerWrapper) Release

func (r *RunnerWrapper) Release(releaseCh chan runnermanager.RunnerReleaseRequest)

func (*RunnerWrapper) RunCommand

func (r *RunnerWrapper) RunCommand(cmd string, args []string) (int64, string, string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL