build

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 16 Imported by: 8

Documentation

Index

Constants

View Source
const KeepAliveMessage = "\u200B" // Zero width space

Variables

View Source
var (
	ErrBuildFail        = status.Errorf(codes.Unknown, "Build returned a non zero value")
	ErrInvalidBuildName = status.Errorf(codes.InvalidArgument, "Invalid Build Name")
)

Functions

This section is empty.

Types

type Build added in v0.24.0

type Build struct {
	Name         string
	LastModified time.Time
}

type BuildOperations

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

func (*BuildOperations) Create

func (ops *BuildOperations) Create(ctx context.Context, appName, buildName string, u *database.User, tarBall io.ReadSeeker, runApp bool) (io.ReadCloser, <-chan error)

func (*BuildOperations) CreateByOpts

func (ops *BuildOperations) CreateByOpts(ctx context.Context, opts *CreateOptions) error

func (*BuildOperations) Delete added in v0.24.0

func (ops *BuildOperations) Delete(appName, buildName string, u *database.User) error

func (*BuildOperations) List added in v0.24.0

func (ops *BuildOperations) List(appName string, u *database.User) ([]*Build, error)

func (*BuildOperations) Run added in v0.24.0

func (ops *BuildOperations) Run(ctx context.Context, appName, buildName string, u *database.User) (io.ReadCloser, <-chan error)

type CreateOptions

type CreateOptions struct {
	App       *app.App
	BuildName string
	SlugIn    string
	SlugDest  string
	TarBall   io.ReadSeeker
	Stream    io.Writer
}

CreateOptions define arguments of method `CreateByOpts`

type FakeOperations

type FakeOperations struct {
}

func NewFakeOperations

func NewFakeOperations() *FakeOperations

func (*FakeOperations) Create

func (f *FakeOperations) Create(ctx context.Context, appName string, buildName string, u *database.User, tarBall io.ReadSeeker, runApp bool) (io.ReadCloser, <-chan error)

func (*FakeOperations) CreateByOpts

func (f *FakeOperations) CreateByOpts(ctx context.Context, opt *CreateOptions) error

func (*FakeOperations) Delete added in v0.24.0

func (f *FakeOperations) Delete(appName, buildName string, u *database.User) error

func (*FakeOperations) List added in v0.24.0

func (f *FakeOperations) List(appName string, u *database.User) ([]*Build, error)

func (*FakeOperations) Run added in v0.24.0

func (f *FakeOperations) Run(ctx context.Context, appName, buildName string, u *database.User) (io.ReadCloser, <-chan error)

type K8sOperations

type K8sOperations interface {
	CreateService(svcSpec *spec.Service) error
	DeletePod(namespace, name string) error
	DeleteService(namespace, name string) error
	WatchServiceURL(namespace, name string) ([]string, error)
	IsInvalid(err error) bool
}

type Operations

type Operations interface {
	CreateByOpts(ctx context.Context, opts *CreateOptions) error
	Create(ctx context.Context, appName, buildName string, u *database.User, tarBall io.ReadSeeker, runApp bool) (io.ReadCloser, <-chan error)
	List(appName string, u *database.User) ([]*Build, error)
	Run(ctx context.Context, appName, buildName string, u *database.User) (io.ReadCloser, <-chan error)
	Delete(appName, buildName string, u *database.User) error
}

type Options

type Options struct {
	SlugBuilderImage string
	SlugRunnerImage  string
	SlugStoreImage   string
	BuildLimitCPU    string
	BuildLimitMemory string
}

type Service

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

func NewService

func NewService(ops Operations, keepAliveTimeout time.Duration) *Service

func (*Service) Delete added in v0.24.0

func (s *Service) Delete(ctx context.Context, req *bpb.DeleteRequest) (*bpb.Empty, error)

func (*Service) List added in v0.24.0

func (s *Service) List(ctx context.Context, req *bpb.ListRequest) (*bpb.ListResponse, error)

func (*Service) Make

func (s *Service) Make(stream bpb.Build_MakeServer) error

func (*Service) RegisterService

func (s *Service) RegisterService(grpcServer *grpc.Server)

func (*Service) Run added in v0.24.0

func (s *Service) Run(req *bpb.RunRequest, stream bpb.Build_RunServer) error

Jump to

Keyboard shortcuts

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