Documentation
¶
Index ¶
- Constants
- type Dependency
- type EnvVariable
- type EnvVariables
- type EventInstanceLog
- type EventInstanceStatusChange
- type EventInstancesChange
- type EventRepository
- type Instance
- type InstanceLogsRepository
- type InstanceMetadata
- type InstanceRepository
- type Listener
- type LogLine
- type Package
- type PackageRepository
- type RunnerRepository
- type Service
- type ServiceMethodDocker
- type ServiceMethodScript
- type ServiceMethods
- type ServiceRepository
- type TempListener
- type URL
- type Update
- type Updates
Constants ¶
View Source
const ( EventNameInstancesChange = "change" EventNameInstanceStatusChange = "status_change" EventNameInstanceStdout = "stdout" EventNameInstanceStderr = "stderr" )
View Source
const ( InstanceStatusOff = "off" InstanceStatusBuilding = "building" InstanceStatusStarting = "starting" InstanceStatusRunning = "running" InstanceStatusError = "error" )
View Source
const ( LogKindOut = "out" LogKindErr = "err" LogKindVertexOut = "vertex_out" LogKindVertexErr = "vertex_err" )
View Source
const ( PmNone = "sources" PmAptGet = "apt-get" PmBrew = "brew" PmPacman = "pacman" PmSnap = "snap" )
View Source
const (
URLKindClient = "client"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency interface { // CheckForUpdate will check if the dependency has an update available. If // true, it returns the Update, or nil otherwise. CheckForUpdate() (*Update, error) // InstallUpdate will install the previously fetched update. InstallUpdate() error // GetID returns the ID of the dependency that can be used to // identify it from the client. GetID() string }
Dependency describes main vertex programs that Vertex needs to run, like Vertex, Vertex Services, Vertex Web UI...
type EnvVariable ¶
type EnvVariables ¶
type EventInstanceLog ¶ added in v0.1.1
type EventInstanceStatusChange ¶ added in v0.1.1
type EventInstancesChange ¶ added in v0.1.1
type EventInstancesChange struct{}
type EventRepository ¶ added in v0.1.1
type Instance ¶
type Instance struct { Service InstanceMetadata UUID uuid.UUID `json:"uuid"` Status string `json:"status"` EnvVariables EnvVariables `json:"env"` }
func (*Instance) DockerContainerName ¶
func (*Instance) DockerImageName ¶
func (*Instance) IsDockerized ¶ added in v0.1.1
type InstanceLogsRepository ¶ added in v0.1.1
type InstanceMetadata ¶
type InstanceMetadata struct { // UseDocker indicates if the instance should be launched with Docker. // The default value is false. UseDocker *bool `json:"use_docker,omitempty"` // UseReleases indicates if the instance should use precompiled releases when possible. // The default value is false. UseReleases *bool `json:"use_releases,omitempty"` // LaunchOnStartup indicates if the instance needs to start automatically when Vertex starts. // The default value is true. LaunchOnStartup *bool `json:"launch_on_startup,omitempty"` }
type InstanceRepository ¶
type InstanceRepository interface { Get(uuid uuid.UUID) (*Instance, error) GetAll() map[uuid.UUID]*Instance GetPath(uuid uuid.UUID) string Delete(uuid uuid.UUID) error Exists(uuid uuid.UUID) bool Set(uuid uuid.UUID, instance Instance) error SaveMetadata(i *Instance) error LoadMetadata(i *Instance) error SaveEnv(i *Instance, variables map[string]string) error LoadEnv(i *Instance) error ReadService(instancePath string) (Service, error) Reload(func(uuid uuid.UUID)) }
type PackageRepository ¶
type RunnerRepository ¶ added in v0.1.1
type Service ¶
type Service struct { ID string `json:"id"` Name string `json:"name"` // Repository describes where to find the service. // - Example for GitHub: github.com/vertex-center/vertex-spotify // - Example for LocalStorage: localstorage:/Users/username/service Repository string `json:"repository"` Description string `json:"description"` EnvDefinitions []EnvVariable `json:"environment,omitempty"` URLs []URL `json:"urls,omitempty"` Methods ServiceMethods `json:"methods"` }
type ServiceMethodDocker ¶ added in v0.1.1
type ServiceMethodScript ¶ added in v0.1.1
type ServiceMethods ¶ added in v0.1.1
type ServiceMethods struct { Script *ServiceMethodScript `json:"script,omitempty"` Docker *ServiceMethodDocker `json:"docker,omitempty"` }
type ServiceRepository ¶
type ServiceRepository interface {
GetAll() []Service
}
type TempListener ¶ added in v0.1.1
type TempListener struct {
// contains filtered or unexported fields
}
func NewTempListener ¶ added in v0.1.1
func NewTempListener(onEvent func(e interface{})) TempListener
func (TempListener) GetUUID ¶ added in v0.1.1
func (t TempListener) GetUUID() uuid.UUID
func (TempListener) OnEvent ¶ added in v0.1.1
func (t TempListener) OnEvent(e interface{})
Click to show internal directories.
Click to hide internal directories.