Documentation ¶
Index ¶
- func ComputeEndpoints(planner runtime.Planner, srv Server, merged *schema.ServerFragment, ...) ([]*schema.Endpoint, []*schema.InternalEndpoint, error)
- func RegisterEndpointProvider(fmwk schema.Framework, f EndpointProvider)
- func ServiceSpecToEndpoint(planner runtime.Planner, srv *schema.Server, spec *schema.Server_ServiceSpec, ...) (*schema.Endpoint, error)
- type EndpointProvider
- type ParsedNode
- type PlannedServer
- type Planner
- type ProvisionOpts
- type Server
- func RequireLoadedServer(ctx context.Context, e pkggraph.SealedContext, pkgname schema.PackageName) (Server, error)
- func RequireServer(ctx context.Context, env cfg.Context, pkgname schema.PackageName) (Server, error)
- func RequireServerWith(ctx context.Context, env cfg.Context, pl *parsing.PackageLoader, ...) (Server, error)
- func (t Server) Deps() []*pkggraph.Package
- func (t Server) Framework() schema.Framework
- func (t Server) GetDep(pkg schema.PackageName) *pkggraph.Package
- func (t Server) Module() *pkggraph.Module
- func (t Server) Name() string
- func (t Server) PackageName() schema.PackageName
- func (t Server) PackageRef() *schema.PackageRef
- func (t Server) Proto() *schema.Server
- func (t Server) RelPath() string
- func (t Server) SealedContext() pkggraph.SealedContext
- func (t Server) StackEntry() *schema.Stack_Entry
- type Servers
- type Stack
- func (stack *Stack) AllPackageList() schema.PackageList
- func (stack *Stack) Get(srv schema.PackageName) (PlannedServer, bool)
- func (stack *Stack) GetComputedResources(resourceID string) []pkggraph.ResourceInstance
- func (stack *Stack) GetEndpoints(srv schema.PackageName) ([]*schema.Endpoint, bool)
- func (stack *Stack) GetStackEntry(srv schema.PackageName) (*schema.Stack_Entry, bool)
- func (stack *Stack) Proto() *schema.Stack
- type StackWithIngress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeEndpoints ¶
func ComputeEndpoints(planner runtime.Planner, srv Server, merged *schema.ServerFragment, serverPorts []*schema.Endpoint_Port) ([]*schema.Endpoint, []*schema.InternalEndpoint, error)
func RegisterEndpointProvider ¶
func RegisterEndpointProvider(fmwk schema.Framework, f EndpointProvider)
XXX this is not the right place for protocol handling.
func ServiceSpecToEndpoint ¶
Types ¶
type EndpointProvider ¶
type EndpointProvider interface {
InternalEndpoints(*schema.Environment, *schema.Server, []*schema.Endpoint_Port) ([]*schema.InternalEndpoint, error)
}
type ParsedNode ¶
type ParsedNode struct { Package *pkggraph.Package ServerFragments []*schema.ServerFragment Startup pkggraph.PreStartup ComputePlanWith []*schema.Invocation Allocations []pkggraph.ValueWithPath PrepareProps planninghooks.ProvisionResult }
func EvalProvision ¶
func EvalProvision(ctx context.Context, secrets is.SecretsSource, server Server, n *pkggraph.Package) (*ParsedNode, error)
type PlannedServer ¶
type PlannedServer struct { Server // Transitive set of servers this server depends on. DeclaredStack schema.PackageList // Post-processed set of `node` dependencies. ParsedDeps []*ParsedNode Resources []pkggraph.ResourceInstance MergedFragment *schema.ServerFragment Endpoints []*schema.Endpoint InternalEndpoints []*schema.InternalEndpoint }
type Planner ¶ added in v0.0.115
type Planner struct { Context cfg.Context Runtime runtime.Planner Registry registry.Manager Secrets secrets.SecretsSource }
func NewPlanner ¶ added in v0.0.115
type ProvisionOpts ¶
type Server ¶
type Server struct { Location pkggraph.Location Package *pkggraph.Package ComputePlanWith []*schema.Invocation EvalStartup func(context.Context, pkggraph.Context, pkggraph.StartupInputs, []pkggraph.ValueWithPath) (*schema.StartupPlan, error) // contains filtered or unexported fields }
Represents a server bound to an environment.
func RequireLoadedServer ¶
func RequireLoadedServer(ctx context.Context, e pkggraph.SealedContext, pkgname schema.PackageName) (Server, error)
func RequireServer ¶
func RequireServerWith ¶
func RequireServerWith(ctx context.Context, env cfg.Context, pl *parsing.PackageLoader, pkgname schema.PackageName) (Server, error)
func (Server) PackageName ¶
func (t Server) PackageName() schema.PackageName
func (Server) PackageRef ¶
func (t Server) PackageRef() *schema.PackageRef
func (Server) SealedContext ¶
func (t Server) SealedContext() pkggraph.SealedContext
func (Server) StackEntry ¶
func (t Server) StackEntry() *schema.Stack_Entry
type Servers ¶
type Servers []Server
func (Servers) Packages ¶
func (stack Servers) Packages() schema.PackageList
type Stack ¶
type Stack struct { Focus schema.PackageList Servers []PlannedServer Endpoints []*schema.Endpoint InternalEndpoints []*schema.InternalEndpoint ComputedResources map[string][]pkggraph.ResourceInstance // Key is resource ID. }
func ComputeStack ¶
func (*Stack) AllPackageList ¶
func (stack *Stack) AllPackageList() schema.PackageList
func (*Stack) Get ¶
func (stack *Stack) Get(srv schema.PackageName) (PlannedServer, bool)
func (*Stack) GetComputedResources ¶ added in v0.0.111
func (stack *Stack) GetComputedResources(resourceID string) []pkggraph.ResourceInstance
func (*Stack) GetEndpoints ¶ added in v0.0.82
func (*Stack) GetStackEntry ¶ added in v0.0.157
func (stack *Stack) GetStackEntry(srv schema.PackageName) (*schema.Stack_Entry, bool)
type StackWithIngress ¶ added in v0.0.115
type StackWithIngress struct { Stack IngressFragments []*schema.IngressFragment }
func (*StackWithIngress) GetIngressesForService ¶ added in v0.0.115
func (s *StackWithIngress) GetIngressesForService(endpointOwner string, serviceName string) []*schema.IngressFragment
Source Files ¶
Click to show internal directories.
Click to hide internal directories.