Documentation ¶
Index ¶
- Constants
- Variables
- func DecideRevisionName(sm ServiceManifest, commit string) (string, error)
- func FindImageTag(sm ServiceManifest) (string, error)
- func MakeManagedByPipedLabel() string
- type Client
- type DiffRenderOptions
- type DiffResult
- type ListOptions
- type Registry
- type Revision
- type RevisionTraffic
- type Service
- type ServiceManifest
- func (m ServiceManifest) AddLabels(labels map[string]string)
- func (m ServiceManifest) Labels() map[string]string
- func (m ServiceManifest) SetRevision(name string) error
- func (m ServiceManifest) UpdateAllTraffic(revision string) error
- func (m ServiceManifest) UpdateTraffic(revisions []RevisionTraffic) error
- func (m ServiceManifest) YamlBytes() ([]byte, error)
- type ServiceManifestCache
Constants ¶
View Source
const ( LabelManagedBy = "pipecd-dev-managed-by" // Always be piped. LabelPiped = "pipecd-dev-piped" // The id of piped handling this application. LabelApplication = "pipecd-dev-application" // The application this resource belongs to. LabelCommitHash = "pipecd-dev-commit-hash" // Hash value of the deployed commit. ManagedByPiped = "piped" )
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)
func MakeManagedByPipedLabel ¶ added in v0.24.1
func MakeManagedByPipedLabel() string
Types ¶
type DiffRenderOptions ¶ added in v0.24.1
type DiffRenderOptions struct { // If true, use "diff" command to render. UseDiffCommand bool }
type DiffResult ¶ added in v0.24.1
type DiffResult struct { Diff *diff.Result Old ServiceManifest New ServiceManifest }
func Diff ¶ added in v0.24.1
func Diff(old, new ServiceManifest, opts ...diff.Option) (*DiffResult, error)
func (*DiffResult) NoChange ¶ added in v0.24.1
func (d *DiffResult) NoChange() bool
func (*DiffResult) Render ¶ added in v0.24.1
func (d *DiffResult) Render(opt DiffRenderOptions) string
type ListOptions ¶ added in v0.24.1
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 RevisionTraffic ¶
type Service ¶
type Service run.Service
func (*Service) ServiceManifest ¶ added in v0.24.1
func (s *Service) ServiceManifest() (ServiceManifest, error)
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) AddLabels ¶ added in v0.24.1
func (m ServiceManifest) AddLabels(labels map[string]string)
func (ServiceManifest) Labels ¶ added in v0.24.1
func (m ServiceManifest) Labels() map[string]string
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 ¶
func (ServiceManifestCache) Get ¶
func (c ServiceManifestCache) Get(commit string) (ServiceManifest, bool)
func (ServiceManifestCache) Put ¶
func (c ServiceManifestCache) Put(commit string, sm ServiceManifest)
Click to show internal directories.
Click to hide internal directories.