cloudrun

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultServiceManifestFilename = "service.yaml"
)

Variables

View Source
var (
	ErrServiceNotFound  = errors.New("not found")
	ErrRevisionNotFound = errors.New("not found")
)

Functions

func DecideRevisionName

func DecideRevisionName(sm ServiceManifest, commit string) (string, error)

func FindImageTag

func FindImageTag(sm ServiceManifest) (string, error)

Types

type Client

type Client interface {
	Create(ctx context.Context, sm ServiceManifest) (*Service, error)
	Update(ctx context.Context, sm ServiceManifest) (*Service, error)
	GetRevision(ctx context.Context, name string) (*Revision, error)
}

type Registry

type Registry interface {
	Client(ctx context.Context, name string, cfg *config.CloudProviderCloudRunConfig, logger *zap.Logger) (Client, error)
}

func DefaultRegistry

func DefaultRegistry() Registry

type Revision

type Revision run.Revision

type RevisionTraffic

type RevisionTraffic struct {
	RevisionName string `json:"revisionName"`
	Percent      int    `json:"percent"`
}

type Service

type Service run.Service

type ServiceManifest

type ServiceManifest struct {
	Name string
	// contains filtered or unexported fields
}

func LoadServiceManifest

func LoadServiceManifest(appDir, serviceFilename string) (ServiceManifest, error)

func ParseServiceManifest

func ParseServiceManifest(data []byte) (ServiceManifest, error)

func (ServiceManifest) SetRevision

func (m ServiceManifest) SetRevision(name string) error

func (ServiceManifest) UpdateAllTraffic

func (m ServiceManifest) UpdateAllTraffic(revision string) error

func (ServiceManifest) UpdateTraffic

func (m ServiceManifest) UpdateTraffic(revisions []RevisionTraffic) error

func (ServiceManifest) YamlBytes

func (m ServiceManifest) YamlBytes() ([]byte, error)

type ServiceManifestCache

type ServiceManifestCache struct {
	AppID  string
	Cache  cache.Cache
	Logger *zap.Logger
}

func (ServiceManifestCache) Get

func (ServiceManifestCache) Put

func (c ServiceManifestCache) Put(commit string, sm ServiceManifest)

Jump to

Keyboard shortcuts

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