build

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

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 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

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

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)
}

type Options

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

type Service

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

func NewService

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

func (*Service) Make

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

func (*Service) RegisterService

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

Jump to

Keyboard shortcuts

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