server

package
v0.0.0-...-1fa5987 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandleHealth http.HandlerFunc = handleHealth

Functions

func BuildRootMux

func BuildRootMux(prefix string, cfg *Config) *http.ServeMux

Types

type Config

type Config struct {
	VarDir      string
	Store       state.Store
	Install     *about.Install
	SyslogPort  uint
	Docker      *docker.Client
	Logger      logging.Logger
	TaskTracker *task.TaskTracker
	TokenClient token.TokenClient
	EsvClient   esv.EsvClient
	ExoVersion  string
	Service     api.Service
}

type Controller

type Controller interface {
	InitResource() error
	MarshalState() (state string, err error)
}

type GraphqlHandler

type GraphqlHandler struct {
	Service api.Service
}

Implements the standard Graphql-over-HTTP spec with support for the graphql-sse protocol in "Distinct connections mode". https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md https://github.com/enisdenjo/graphql-sse/blob/58ac322d8a56e5f4a376bd165ae03c7f76716a03/PROTOCOL.md

func (*GraphqlHandler) ServeHTTP

func (h *GraphqlHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Kernel

type Kernel struct {
	Store       state.Store
	Install     *about.Install
	TaskTracker *task.TaskTracker
	EsvClient   esv.EsvClient
}

func (*Kernel) AuthEsv

func (kern *Kernel) AuthEsv(ctx context.Context, input *api.AuthEsvInput) (*api.AuthEsvOutput, error)

func (*Kernel) CreateProject

func (kern *Kernel) CreateProject(ctx context.Context, input *api.CreateProjectInput) (*api.CreateProjectOutput, error)

func (*Kernel) CreateWorkspace

func (kern *Kernel) CreateWorkspace(ctx context.Context, input *api.CreateWorkspaceInput) (*api.CreateWorkspaceOutput, error)

func (*Kernel) DescribeTasks

func (kern *Kernel) DescribeTasks(ctx context.Context, input *api.DescribeTasksInput) (*api.DescribeTasksOutput, error)

func (*Kernel) DescribeTemplates

func (kern *Kernel) DescribeTemplates(ctx context.Context, input *api.DescribeTemplatesInput) (*api.DescribeTemplatesOutput, error)

func (*Kernel) DescribeWorkspaces

func (kern *Kernel) DescribeWorkspaces(ctx context.Context, input *api.DescribeWorkspacesInput) (*api.DescribeWorkspacesOutput, error)

func (*Kernel) Exit

func (kern *Kernel) Exit(context.Context, *api.ExitInput) (*api.ExitOutput, error)

func (*Kernel) GetEsvUser

func (kern *Kernel) GetEsvUser(ctx context.Context, input *api.GetEsvUserInput) (*api.GetEsvUserOutput, error)

func (*Kernel) GetUserHomeDir

func (kern *Kernel) GetUserHomeDir(ctx context.Context, input *api.GetUserHomeDirInput) (*api.GetUserHomeDirOutput, error)

func (*Kernel) GetVersion

func (kern *Kernel) GetVersion(ctx context.Context, input *api.GetVersionInput) (*api.GetVersionOutput, error)

func (*Kernel) Panic

func (kern *Kernel) Panic(ctx context.Context, input *api.PanicInput) (*api.PanicOutput, error)

func (*Kernel) Ping

func (kern *Kernel) Ping(context.Context, *api.PingInput) (*api.PingOutput, error)

func (*Kernel) ReadDir

func (kern *Kernel) ReadDir(ctx context.Context, input *api.ReadDirInput) (*api.ReadDirOutput, error)

func (*Kernel) ResolveWorkspace

func (kern *Kernel) ResolveWorkspace(ctx context.Context, input *api.ResolveWorkspaceInput) (*api.ResolveWorkspaceOutput, error)

func (*Kernel) SaveEsvRefreshToken

func (kern *Kernel) SaveEsvRefreshToken(ctx context.Context, input *api.SaveEsvRefreshTokenInput) (*api.SaveEsvRefreshTokenOutput, error)

func (*Kernel) UnauthEsv

func (kern *Kernel) UnauthEsv(ctx context.Context, input *api.UnauthEsvInput) (*api.UnauthEsvOutput, error)

func (*Kernel) Upgrade

func (kern *Kernel) Upgrade(ctx context.Context, input *api.UpgradeInput) (*api.UpgradeOutput, error)

type Workspace

type Workspace struct {
	ID          string
	VarDir      string
	Store       state.Store
	SyslogPort  uint
	Logger      logging.Logger // TODO: Embed in context, so it can be annotated with request info.
	Docker      *dockerclient.Client
	TaskTracker *task.TaskTracker
	EsvClient   esv.EsvClient
}

func (*Workspace) AddVault

func (ws *Workspace) AddVault(ctx context.Context, input *api.AddVaultInput) (*api.AddVaultOutput, error)

func (*Workspace) Apply

func (ws *Workspace) Apply(ctx context.Context, input *api.ApplyInput) (*api.ApplyOutput, error)

func (*Workspace) Build

func (ws *Workspace) Build(ctx context.Context, input *api.BuildInput) (*api.BuildOutput, error)

func (*Workspace) BuildComponents

func (ws *Workspace) BuildComponents(ctx context.Context, input *api.BuildComponentsInput) (*api.BuildComponentsOutput, error)

func (*Workspace) CreateComponent

func (ws *Workspace) CreateComponent(ctx context.Context, input *api.CreateComponentInput) (*api.CreateComponentOutput, error)

func (*Workspace) DeleteComponents

func (ws *Workspace) DeleteComponents(ctx context.Context, input *api.DeleteComponentsInput) (*api.DeleteComponentsOutput, error)

func (*Workspace) Describe

func (ws *Workspace) Describe(ctx context.Context, input *api.DescribeInput) (*api.DescribeOutput, error)

func (*Workspace) DescribeComponents

func (ws *Workspace) DescribeComponents(ctx context.Context, input *api.DescribeComponentsInput) (*api.DescribeComponentsOutput, error)

func (*Workspace) DescribeEnvironment

func (ws *Workspace) DescribeEnvironment(ctx context.Context, input *api.DescribeEnvironmentInput) (*api.DescribeEnvironmentOutput, error)

func (*Workspace) DescribeNetworks

func (ws *Workspace) DescribeNetworks(ctx context.Context, input *api.DescribeNetworksInput) (*api.DescribeNetworksOutput, error)

func (*Workspace) DescribeProcesses

func (ws *Workspace) DescribeProcesses(ctx context.Context, input *api.DescribeProcessesInput) (*api.DescribeProcessesOutput, error)

func (*Workspace) DescribeVaults

func (ws *Workspace) DescribeVaults(ctx context.Context, input *api.DescribeVaultsInput) (*api.DescribeVaultsOutput, error)

func (*Workspace) DescribeVolumes

func (ws *Workspace) DescribeVolumes(ctx context.Context, input *api.DescribeVolumesInput) (*api.DescribeVolumesOutput, error)

func (*Workspace) Destroy

func (ws *Workspace) Destroy(ctx context.Context, input *api.DestroyInput) (*api.DestroyOutput, error)

func (*Workspace) DisposeComponents

func (ws *Workspace) DisposeComponents(ctx context.Context, input *api.DisposeComponentsInput) (*api.DisposeComponentsOutput, error)

func (*Workspace) ExportProcfile

func (ws *Workspace) ExportProcfile(ctx context.Context, input *api.ExportProcfileInput) (*api.ExportProcfileOutput, error)

func (*Workspace) GetComponentState

func (ws *Workspace) GetComponentState(ctx context.Context, input *api.GetComponentStateInput) (*api.GetComponentStateOutput, error)

func (*Workspace) GetEvents

func (ws *Workspace) GetEvents(ctx context.Context, input *api.GetEventsInput) (*api.GetEventsOutput, error)

func (*Workspace) ReadFile

func (ws *Workspace) ReadFile(ctx context.Context, input *api.ReadFileInput) (*api.ReadFileOutput, error)

func (*Workspace) RefreshComponents

func (ws *Workspace) RefreshComponents(ctx context.Context, input *api.RefreshComponentsInput) (*api.RefreshComponentsOutput, error)

func (*Workspace) RemoveVault

func (ws *Workspace) RemoveVault(ctx context.Context, input *api.RemoveVaultInput) (*api.RemoveVaultOutput, error)

func (*Workspace) RenameComponent

func (ws *Workspace) RenameComponent(ctx context.Context, input *api.RenameComponentInput) (*api.RenameComponentOutput, error)

func (*Workspace) RenderDependencies

func (ws *Workspace) RenderDependencies(ctx context.Context, input *api.RenderDependenciesInput) (*api.RenderDependenciesOutput, error)

func (*Workspace) Resolve

func (ws *Workspace) Resolve(ctx context.Context, input *api.ResolveInput) (*api.ResolveOutput, error)

func (*Workspace) ResolveManifest

func (ws *Workspace) ResolveManifest(ctx context.Context, input *api.ResolveManifestInput) (*api.ResolveManifestOutput, error)

func (*Workspace) Restart

func (ws *Workspace) Restart(ctx context.Context, input *api.RestartInput) (*api.RestartOutput, error)

func (*Workspace) RestartComponents

func (ws *Workspace) RestartComponents(ctx context.Context, input *api.RestartComponentsInput) (*api.RestartComponentsOutput, error)

func (*Workspace) SetComponentState

func (ws *Workspace) SetComponentState(ctx context.Context, input *api.SetComponentStateInput) (*api.SetComponentStateOutput, error)

func (*Workspace) Signal

func (ws *Workspace) Signal(ctx context.Context, input *api.SignalInput) (*api.SignalOutput, error)

func (*Workspace) SignalComponents

func (ws *Workspace) SignalComponents(ctx context.Context, input *api.SignalComponentsInput) (*api.SignalComponentsOutput, error)

func (*Workspace) Start

func (ws *Workspace) Start(ctx context.Context, input *api.StartInput) (*api.StartOutput, error)

func (*Workspace) StartComponents

func (ws *Workspace) StartComponents(ctx context.Context, input *api.StartComponentsInput) (*api.StartComponentsOutput, error)

func (*Workspace) Stop

func (ws *Workspace) Stop(ctx context.Context, input *api.StopInput) (*api.StopOutput, error)

func (*Workspace) StopComponents

func (ws *Workspace) StopComponents(ctx context.Context, input *api.StopComponentsInput) (*api.StopComponentsOutput, error)

func (*Workspace) UpdateComponent

func (ws *Workspace) UpdateComponent(ctx context.Context, input *api.UpdateComponentInput) (*api.UpdateComponentOutput, error)

func (*Workspace) WriteFile

func (ws *Workspace) WriteFile(ctx context.Context, input *api.WriteFileInput) (*api.WriteFileOutput, error)

Jump to

Keyboard shortcuts

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