backend

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRouter

type APIRouter interface {
	AddRPC(route string) error
	AddAPIToRPC(route string, api rpc.API) error
}

type Backend

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

func NewBackend

func NewBackend(log log.Logger, m metrics.Metricer, ensemble *work.Ensemble, jobs work.Jobs, router APIRouter) *Backend

func (*Backend) CreateJob

func (ba *Backend) CreateJob(ctx context.Context, id seqtypes.BuilderID, opts *seqtypes.BuildOpts) (work.BuildJob, error)

func (*Backend) GetJob

func (ba *Backend) GetJob(id seqtypes.BuildJobID) work.BuildJob

GetJob returns nil if the job isn't known.

func (*Backend) Hello

func (ba *Backend) Hello(ctx context.Context, name string) (string, error)

func (*Backend) Start

func (ba *Backend) Start(ctx context.Context) error

func (*Backend) Stop

func (ba *Backend) Stop(ctx context.Context) error

type MockBackend

type MockBackend struct{}

func NewMockBackend

func NewMockBackend() *MockBackend

func (*MockBackend) CreateJob

func (ba *MockBackend) CreateJob(ctx context.Context, id seqtypes.BuilderID, opts *seqtypes.BuildOpts) (work.BuildJob, error)

func (*MockBackend) GetJob

func (ba *MockBackend) GetJob(id seqtypes.BuildJobID) work.BuildJob

func (*MockBackend) Hello

func (ba *MockBackend) Hello(ctx context.Context, name string) (string, error)

func (*MockBackend) Start

func (ba *MockBackend) Start(ctx context.Context) error

func (*MockBackend) Stop

func (ba *MockBackend) Stop(ctx context.Context) error

func (*MockBackend) UnregisterJob

func (ba *MockBackend) UnregisterJob(id seqtypes.BuildJobID)

Jump to

Keyboard shortcuts

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