Documentation
¶
Index ¶
- Constants
- func FormatDeploymentPointer(pointer, promotionID string) string
- func IsDefaultPointer(pointer string) bool
- func ParseDeploymentPointer(pointer string) (preview, promotionID string, ok bool)
- func ResolvePointer(pointer string) string
- type Claim
- type EdgeBundle
- type Facts
- type HistoryEntry
- type Hooks
- type Kind
- type OriginHooks
- type PointerMove
- type PointerRemoval
- type Promotion
- type Propagation
- type PruneResult
- type ReleaseRecord
- type ReleaseSecrets
- type RouteTable
- type RouteTableLocation
- type Router
- type Stack
- type StackSpec
- type StackState
- type StillActive
- type Unserved
- type VariableRecord
Constants ¶
View Source
const DefaultPointer = "@production"
View Source
const HeaderRouter = "x-ocel-router"
Variables ¶
This section is empty.
Functions ¶
func FormatDeploymentPointer ¶
func IsDefaultPointer ¶
func ParseDeploymentPointer ¶
func ResolvePointer ¶
Types ¶
type EdgeBundle ¶
type HistoryEntry ¶
type Hooks ¶
type Hooks struct {
Origin *OriginHooks
}
type OriginHooks ¶
type OriginHooks struct {
PlanProjectRemoval func(scope edge.ProjectScope) ([]edge.PlanGroup, error)
ClaimPreviewEntry func(ctx context.Context, claim Claim) (edge.Origin, error)
DisclaimPreviewEntry func(ctx context.Context, baseDomain string) error
PlanPreviewEntryRemoval func(wildcard string) ([]edge.PlanGroup, error)
}
type PointerMove ¶
type PointerMove struct {
Pointer string
Promotion Promotion
Records map[string]ReleaseRecord
Hosts []edge.PreviewHost
Superseded []edge.PreviewHost
Kept []Promotion
StillActive StillActive
}
func (PointerMove) ListHostsToWithdraw ¶
func (m PointerMove) ListHostsToWithdraw() []edge.PreviewHost
func (PointerMove) RefuseInactive ¶
func (m PointerMove) RefuseInactive(ctx context.Context) error
type PointerRemoval ¶
type PointerRemoval struct {
Pointer string `json:"pointer"`
Hosts []edge.PreviewHost `json:"hosts,omitempty"`
}
type Promotion ¶
type Promotion struct {
PromotionID string `json:"promotionId"`
Ts int64 `json:"ts"`
Releases map[string]string `json:"releases"`
Tag string `json:"tag,omitempty"`
Propagation *Propagation `json:"propagation,omitempty"`
Hosts []edge.PreviewHost `json:"hosts,omitempty"`
}
type Propagation ¶
type PruneResult ¶
type PruneResult struct {
KeptPromotionIDs []string `json:"keptPromotionIds"`
RemovedPromotionIDs []string `json:"removedPromotionIds"`
UnnamedRecordKeys []string `json:"unnamedRecordKeys"`
SurvivingRecordKeys []string `json:"survivingRecordKeys"`
SurvivingPointerRecordKeys []string `json:"survivingPointerRecordKeys"`
DeploymentRemovals []PointerRemoval `json:"deploymentRemovals,omitempty"`
}
type ReleaseRecord ¶
type ReleaseRecord struct {
App string `json:"app"`
Framework string `json:"framework"`
Release string `json:"release"`
BuildID string `json:"buildId"`
RootFunction string `json:"rootFunction"`
RootFunctionPhysical string `json:"rootFunctionPhysical,omitempty"`
Image string `json:"image,omitempty"`
Physical string `json:"physical,omitempty"`
Revisions map[string]string `json:"revisions,omitempty"`
Origin string `json:"origin,omitempty"`
HealthPath string `json:"healthPath,omitempty"`
HealthPathDiscovered bool `json:"healthPathDiscovered,omitempty"`
RouteTable *RouteTableLocation `json:"routeTable,omitempty"`
Static *edge.Static `json:"static,omitempty"`
FunctionURLs map[string]string `json:"functionUrls"`
StorageCoordinate string `json:"storageCoordinate"`
Prerenders bool `json:"prerenders,omitempty"`
CreatedAt int64 `json:"createdAt"`
EdgeBundle *EdgeBundle `json:"edgeBundle,omitempty"`
ReleaseFingerprint string `json:"releaseFingerprint,omitempty"`
OriginSecretFingerprint string `json:"originSecretFingerprint,omitempty"`
Variables []VariableRecord `json:"variables,omitempty"`
Needs []edge.Need `json:"needs,omitempty"`
SupportInEffect []edge.Need `json:"supportInEffect,omitempty"`
Waived []edge.Need `json:"waived,omitempty"`
Secrets ReleaseSecrets `json:"-"`
Sealed []byte `json:"sealed,omitempty" ts:"-"`
}
func (ReleaseRecord) ParseStorageCoordinate ¶
func (r ReleaseRecord) ParseStorageCoordinate() (naming.Coordinate, error)
type ReleaseSecrets ¶
type ReleaseSecrets struct {
PurgeSecret string `json:"purgeSecret,omitempty"`
Env map[string]string `json:"env,omitempty"`
Envelope string `json:"envelope,omitempty"`
}
func (ReleaseSecrets) IsZero ¶
func (s ReleaseSecrets) IsZero() bool
type RouteTable ¶
type RouteTable struct {
Format edge.RouteTableFormat `json:"format"`
Table json.RawMessage `json:"table"`
}
type RouteTableLocation ¶
type RouteTableLocation struct {
Format edge.RouteTableFormat `json:"format"`
Key string `json:"key"`
}
type Stack ¶
type Stack interface {
State() StackState
Claim(ctx context.Context, claim Claim) (edge.Origin, error)
Disclaim(ctx context.Context, hostname string) error
MovePointer(ctx context.Context, move PointerMove, progress progress.Log) error
RemovePointer(ctx context.Context, removal PointerRemoval, progress progress.Log) error
Destroy(ctx context.Context) error
}
type StackSpec ¶
type StackSpec struct {
Tier environment.Tier
Slug string
}
type StackState ¶
type StackState struct {
Slug string `json:"slug,omitempty"`
Tier environment.Tier `json:"tier,omitempty"`
Edge edge.StackState `json:"edge,omitzero"`
}
func NewStackState ¶
func NewStackState(shared edge.StackState) StackState
func (StackState) WithSpec ¶
func (s StackState) WithSpec(spec StackSpec) StackState
type StillActive ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.