cloudrun

package
v2.11.1 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: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	PortForwardResources() []*latest.PortForwardResource
	PortForwardOptions() config.PortForwardOptions
	Mode() config.RunMode
	Tail() bool
}

Config contains config options needed for cloud run

type Deployer

type Deployer struct {
	*latest.CloudRunDeploy

	Project string
	Region  string
	// contains filtered or unexported fields
}

Deployer deploys code to Google Cloud Run.

func NewDeployer

func NewDeployer(cfg Config, labeller *label.DefaultLabeller, crDeploy *latest.CloudRunDeploy, configName string) (*Deployer, error)

NewDeployer creates a new Deployer for Cloud Run from the Skaffold deploy config.

func (*Deployer) Cleanup

func (d *Deployer) Cleanup(ctx context.Context, out io.Writer, dryRun bool, byConfig manifest.ManifestListByConfig) error

Cleanup deletes the created Cloud Run services

func (*Deployer) ConfigName

func (d *Deployer) ConfigName() string

func (*Deployer) Dependencies

func (d *Deployer) Dependencies() ([]string, error)

Dependencies list the files that would trigger a redeploy

func (*Deployer) Deploy

func (d *Deployer) Deploy(ctx context.Context, out io.Writer, artifacts []graph.Artifact, manifestsByConfig manifest.ManifestListByConfig) error

Deploy creates a Cloud Run service using the provided manifest.

func (*Deployer) GetAccessor

func (d *Deployer) GetAccessor() access.Accessor

GetAccessor gets a no-op accessor for Cloud Run.

func (*Deployer) GetDebugger

func (d *Deployer) GetDebugger() debug.Debugger

GetDebugger Get the Debugger for Cloud Run. Not supported by this deployer.

func (*Deployer) GetLogger

func (d *Deployer) GetLogger() log.Logger

GetLogger Get the logger for the Cloud Run deploy.

func (*Deployer) GetStatusMonitor

func (d *Deployer) GetStatusMonitor() status.Monitor

GetStatusMonitor gets the resource that will monitor deployment status.

func (*Deployer) GetSyncer

func (d *Deployer) GetSyncer() sync.Syncer

GetSyncer gets the file syncer for Cloud Run. Not supported by this deployer.

func (*Deployer) HasRunnableHooks

func (d *Deployer) HasRunnableHooks() bool

func (*Deployer) PostDeployHooks

func (d *Deployer) PostDeployHooks(ctx context.Context, out io.Writer) error

func (*Deployer) PreDeployHooks

func (d *Deployer) PreDeployHooks(ctx context.Context, out io.Writer) error

func (*Deployer) RegisterLocalImages

func (d *Deployer) RegisterLocalImages([]graph.Artifact)

RegisterLocalImages is not supported by this deployer.

func (*Deployer) TrackBuildArtifacts

func (d *Deployer) TrackBuildArtifacts(_, _ []graph.Artifact)

TrackBuildArtifacts is not supported by this deployer.

type LogAggregator

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

func NewLoggerAggregator

func NewLoggerAggregator(cfg Config, label string) *LogAggregator

func (*LogAggregator) AddResource

func (r *LogAggregator) AddResource(resource RunResourceName)

func (*LogAggregator) Mute

func (r *LogAggregator) Mute()

func (*LogAggregator) RegisterArtifacts

func (r *LogAggregator) RegisterArtifacts(artifacts []graph.Artifact)

func (*LogAggregator) SetSince

func (r *LogAggregator) SetSince(time time.Time)

func (*LogAggregator) Start

func (r *LogAggregator) Start(ctx context.Context, out io.Writer) error

func (*LogAggregator) Stop

func (r *LogAggregator) Stop()

func (*LogAggregator) Unmute

func (r *LogAggregator) Unmute()

type LogFormatter

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

func (*LogFormatter) Name

func (formatter *LogFormatter) Name() string

func (*LogFormatter) PrintLine

func (formatter *LogFormatter) PrintLine(out io.Writer, line string)

type Monitor

type Monitor struct {
	Resources []RunResourceName
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(labeller *label.DefaultLabeller, clientOptions []option.ClientOption) *Monitor

func (*Monitor) Check

func (s *Monitor) Check(ctx context.Context, out io.Writer) error

func (*Monitor) Reset

func (s *Monitor) Reset()

type ResourceType

type ResourceType string

type RunAccessor

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

RunAccessor is an access.Accessor for Cloud Run resources It uses `gcloud run proxy“to enable port forwarding for Cloud Run. This makes it easier to call IAM-protected Cloud Run services by going through localhost. In order to set up forwarding, the services must have their ingress setting set to "all", gcloud must be installed and on the path, and the currently configured gcloud user has run.services.invoke permission on the services being proxied

func NewAccessor

func NewAccessor(cfg Config, label string) *RunAccessor

NewAccessor creates a new RunAccessor to port forward Cloud Run services

func (*RunAccessor) AddResource

func (r *RunAccessor) AddResource(resource RunResourceName)

AddResource tracks an additional resource to port forward

func (*RunAccessor) Start

func (r *RunAccessor) Start(ctx context.Context, out io.Writer) error

Start begins port forwarding for the tracked Cloud Run services.

func (*RunAccessor) Stop

func (r *RunAccessor) Stop()

Stop terminates port forwarding for all tracked Cloud Run resources.

type RunResourceName

type RunResourceName struct {
	Project string
	Region  string
	Service string
	Job     string
}

RunResourceName represents a Cloud Run Service

func (RunResourceName) Name

func (n RunResourceName) Name() string

func (RunResourceName) String

func (n RunResourceName) String() string

String returns the path representation of a Cloud Run Service.

func (RunResourceName) Type

func (n RunResourceName) Type() ResourceType

type Status

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

Jump to

Keyboard shortcuts

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