client

package
v0.0.0-...-f65cdbb Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCtlHostAddr = errors.New("the control service address was not specified in the env file using ctl.host")

Functions

This section is empty.

Types

type Ctl

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

func NewCtl

func NewCtl(ctx context.Context, d service.GrpcDialer) (*Ctl, error)

func (*Ctl) AddEnvironment

func (c *Ctl) AddEnvironment(ctx context.Context, environment *pb.Environment) (*pb.Environment, error)

func (*Ctl) AddPackage

func (c *Ctl) AddPackage(ctx context.Context, pkg *pb.JobPackage) (*pb.JobPackage, error)

func (*Ctl) AddTenant

func (c *Ctl) AddTenant(ctx context.Context, tenant *pb.Tenant) (*pb.Tenant, error)

func (*Ctl) AllPackages

func (c *Ctl) AllPackages(ctx context.Context) ([]*pb.JobPackage, error)

func (*Ctl) Close

func (c *Ctl) Close() error

func (*Ctl) DeletePackage

func (c *Ctl) DeletePackage(ctx context.Context, pkg *pb.JobPackage) error

func (*Ctl) Environment

func (c *Ctl) Environment(ctx context.Context) (*pb.Environment, error)

func (*Ctl) ListenerForEnvironmentUpdates

func (c *Ctl) ListenerForEnvironmentUpdates(ctx context.Context) (*broadcaster.Listener[*pb.UpdateToEnvironmentStrReply], error)

func (*Ctl) ListenerForPackageUpdates

func (c *Ctl) ListenerForPackageUpdates(ctx context.Context) (*broadcaster.Listener[*pb.UpdateToPackagesStrReply], error)

func (*Ctl) Package

func (c *Ctl) Package(ctx context.Context, tenant string, id *string) ([]*pb.JobPackage, error)

func (*Ctl) Packages

func (c *Ctl) Packages(ctx context.Context, tenant string) ([]*pb.JobPackage, error)

func (*Ctl) Tenant

func (c *Ctl) Tenant(ctx context.Context, id *string) ([]*pb.Tenant, error)

func (*Ctl) Tenants

func (c *Ctl) Tenants(ctx context.Context) ([]*pb.Tenant, error)

func (*Ctl) UpdateEnvironment

func (c *Ctl) UpdateEnvironment(ctx context.Context, environment *pb.Environment) error

func (*Ctl) UpdatePackage

func (c *Ctl) UpdatePackage(ctx context.Context, pkg *pb.JobPackage) error

type Metadata

type Metadata struct{}

func NewMetadata

func NewMetadata() *Metadata

func (*Metadata) Metadata

func (c *Metadata) Metadata(ctx context.Context, name string) (map[string]string, error)

type Queue

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

func NewQueue

func NewQueue(ctx context.Context, d service.GrpcDialer) (*Queue, error)

func (*Queue) Close

func (c *Queue) Close() error

func (*Queue) Dequeue

func (c *Queue) Dequeue(ctx context.Context, tenant string, queue string) ([]*pb.QueueItem, error)

func (*Queue) Queue

func (c *Queue) Queue(ctx context.Context, queueRequest *pb.QueueRequest) error

type Recorder

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

func NewRecorder

func NewRecorder(ctx context.Context, dialer service.GrpcDialer) (*Recorder, error)

func (*Recorder) AddJobExecution

func (c *Recorder) AddJobExecution(ctx context.Context, ex *pb.JobExecution) error

func (*Recorder) Close

func (c *Recorder) Close() error

func (*Recorder) JobExecutions

func (c *Recorder) JobExecutions(ctx context.Context, tenant string, lines int32) ([]string, error)

func (*Recorder) StreamJobExecutions

func (c *Recorder) StreamJobExecutions(ctx context.Context, lines int32, resChan chan<- string) error

type Repo

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

func NewRepo

func NewRepo(ctx context.Context, d service.GrpcDialer) (*Repo, error)

func (*Repo) AddFile

func (c *Repo) AddFile(ctx context.Context, tenant string, name string, fileType pb.File_FileType, reader io.Reader) error

func (*Repo) AllFilenames

func (c *Repo) AllFilenames(ctx context.Context) ([]*pb.TenantFiles, error)

func (*Repo) Close

func (c *Repo) Close() error

func (*Repo) File

func (c *Repo) File(ctx context.Context, tenant string, name string) ([]byte, error)

func (*Repo) ListenerForRepoUpdates

func (c *Repo) ListenerForRepoUpdates(ctx context.Context) (*broadcaster.Listener[*pb.UpdateToFileStrReply], error)

Jump to

Keyboard shortcuts

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