Documentation ¶
Index ¶
- func ComputeEndpoints(srv Server, allocatedPorts []*schema.Endpoint_Port) ([]*schema.Endpoint, []*schema.InternalEndpoint, error)
- func RegisterEndpointProvider(fmwk schema.Framework, f EndpointProvider)
- func ServiceSpecToEndpoint(srv *schema.Server, spec *schema.Server_ServiceSpec, t schema.Endpoint_Type) (*schema.Endpoint, error)
- type EndpointProvider
- type ParsedNode
- type PlannedServer
- 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) 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) GetServerProto(srv schema.PackageName) (*schema.Server, bool)
- func (stack *Stack) Proto() *schema.Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeEndpoints ¶
func ComputeEndpoints(srv Server, allocatedPorts []*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 ¶
func ServiceSpecToEndpoint(srv *schema.Server, spec *schema.Server_ServiceSpec, t schema.Endpoint_Type) (*schema.Endpoint, error)
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 ProvisionPlan pkggraph.ProvisionPlan Allocations []pkggraph.ValueWithPath PrepareProps planninghooks.ProvisionResult }
func EvalProvision ¶
type PlannedServer ¶
type PlannedServer struct { Server DeclaredStack schema.PackageList ParsedDeps []*ParsedNode Resources []pkggraph.ResourceInstance AllocatedPorts []*schema.Endpoint_Port Endpoints []*schema.Endpoint InternalEndpoints []*schema.InternalEndpoint }
func (PlannedServer) SidecarsAndInits ¶
func (p PlannedServer) SidecarsAndInits() ([]*schema.Container, []*schema.Container)
type ProvisionOpts ¶
type Server ¶
type Server struct { Location pkggraph.Location Package *pkggraph.Package Provisioning pkggraph.PreparedProvisionPlan // A provisioning plan that is attached to the server itself. Startup pkggraph.PreStartup // 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) GetServerProto ¶ added in v0.0.82
Click to show internal directories.
Click to hide internal directories.