services

package
v0.1.126 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearAgents

func ClearAgents()

func ForCreate added in v0.1.113

func ForCreate(opt *BuilderLoadOptions)

func ForSync added in v0.1.113

func ForSync(opt *BuilderLoadOptions)

func LoadAgent

func LoadAgent(ctx context.Context, agent *resources.Agent) (*coreservices.ServiceAgent, error)

func LoadBuilder

func LoadBuilder(ctx context.Context, conf *resources.Service) (*coreservices.BuilderAgent, error)

func LoadRuntime

func LoadRuntime(ctx context.Context, service *resources.Service) (*coreservices.RuntimeAgent, error)

func NetworkMappingForRestRouteGroup

func NetworkMappingForRestRouteGroup(ctx context.Context, group *resources.RestRouteGroup, mappings []*basev0.NetworkMapping) (*basev0.NetworkMapping, error)

NetworkMappingForRestRouteGroup finds the proper network mapping for a given route group

func NewBuilderAgent

func NewBuilderAgent(conf *resources.Agent, builder coreservices.Builder) agents.AgentImplementation

func NewServiceAgent

func NewServiceAgent(conf *resources.Agent, service coreservices.Agent) agents.AgentImplementation

NewServiceAgent binds the agent implementation to the agent

Types

type AddOutput added in v0.1.114

type AddOutput struct {
	ReadMe string
}

func Add

type AgentUpdate

type AgentUpdate struct {
	Name string
	From string
	To   string
}

type BuilderInstance

type BuilderInstance struct {
	*Instance

	services.Builder
}

func (*BuilderInstance) Create

func (*BuilderInstance) Load

func (instance *BuilderInstance) Load(ctx context.Context, opts ...BuilderLoadOption) (*builderv0.LoadResponse, error)

func (*BuilderInstance) Sync

type BuilderLoadOption added in v0.1.113

type BuilderLoadOption func(opt *BuilderLoadOptions)

type BuilderLoadOptions added in v0.1.113

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

type InformationStatus

type InformationStatus struct {
	Load  *runtimev0.LoadStatus
	Init  *runtimev0.InitStatus
	Start *runtimev0.StartStatus

	DesiredState *runtimev0.DesiredState
}

type Instance

type Instance struct {
	*resources.Service
	Workspace *resources.Workspace

	Agent services.Agent
	Info  *agentv0.AgentInformation

	Builder *BuilderInstance
	Runtime *RuntimeInstance

	ProcessInfo
	Capabilities []*agentv0.Capability
}

func Load

func Load(ctx context.Context, service *resources.Service) (*Instance, error)

func (*Instance) CheckCapabilities

func (instance *Instance) CheckCapabilities(capability agentv0.Capability_Type) error

func (*Instance) LoadBuilder

func (instance *Instance) LoadBuilder(ctx context.Context) error

func (*Instance) LoadRuntime

func (instance *Instance) LoadRuntime(ctx context.Context, withRuntimeCheck bool) error

func (*Instance) WithWorkspace

func (instance *Instance) WithWorkspace(workspace *resources.Workspace)

type ProcessInfo

type ProcessInfo struct {
	AgentPID int
}

type RuntimeInstance

type RuntimeInstance struct {
	*Instance

	services.Runtime

	IsHotReloading bool
}

func (*RuntimeInstance) Load

type UpdateInformation

type UpdateInformation struct {
	*AgentUpdate
}

func UpdateAgent

func UpdateAgent(ctx context.Context, service *resources.Service) (*UpdateInformation, error)

Jump to

Keyboard shortcuts

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