gwconfig

package
v16.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PrivateConfig
	PublicConfig
}

Generic Worker config

func (*Config) AWSProvisioner

func (c *Config) AWSProvisioner() *tcawsprovisioner.AwsProvisioner

func (*Config) Auth

func (c *Config) Auth() *tcauth.Auth

func (*Config) Credentials

func (c *Config) Credentials() *tcclient.Credentials

func (*Config) MergeInJSON

func (c *Config) MergeInJSON(data json.RawMessage, extract func(map[string]interface{}) map[string]interface{}) error

MergeInJSON merges config embedded inside a json.RawMessage into c.

It does this by converting c to a map[string]interface, convering data to a map[string]interface and calling extract against the result to return a map[string]interface for its config portion, then merging the two map[string]interfaces together and unmarshaling back into c.

func (*Config) Persist

func (c *Config) Persist(file string) error

Persist writes config to json file

func (*Config) PurgeCache

func (c *Config) PurgeCache() *tcpurgecache.PurgeCache

func (*Config) Queue

func (c *Config) Queue() *tcqueue.Queue

func (*Config) Secrets

func (c *Config) Secrets() *tcsecrets.Secrets

func (*Config) String

func (c *Config) String() string

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) WorkerManager

func (c *Config) WorkerManager() *tcworkermanager.WorkerManager

type MissingConfigError

type MissingConfigError struct {
	Setting string
}

func (MissingConfigError) Error

func (err MissingConfigError) Error() string

type PrivateConfig

type PrivateConfig struct {
	AccessToken   string `json:"accessToken"`
	Certificate   string `json:"certificate"`
	LiveLogSecret string `json:"livelogSecret"`
}

type PublicConfig

type PublicConfig struct {
	PublicEngineConfig
	AuthBaseURL                    string                 `json:"authBaseURL"`
	AvailabilityZone               string                 `json:"availabilityZone"`
	CachesDir                      string                 `json:"cachesDir"`
	CheckForNewDeploymentEverySecs uint                   `json:"checkForNewDeploymentEverySecs"`
	CleanUpTaskDirs                bool                   `json:"cleanUpTaskDirs"`
	ClientID                       string                 `json:"clientId"`
	DeploymentID                   string                 `json:"deploymentId"`
	DisableReboots                 bool                   `json:"disableReboots"`
	DownloadsDir                   string                 `json:"downloadsDir"`
	Ed25519SigningKeyLocation      string                 `json:"ed25519SigningKeyLocation"`
	IdleTimeoutSecs                uint                   `json:"idleTimeoutSecs"`
	InstanceID                     string                 `json:"instanceId"`
	InstanceType                   string                 `json:"instanceType"`
	LiveLogCertificate             string                 `json:"livelogCertificate"`
	LiveLogExecutable              string                 `json:"livelogExecutable"`
	LiveLogGETPort                 uint16                 `json:"livelogGETPort"`
	LiveLogKey                     string                 `json:"livelogKey"`
	LiveLogPUTPort                 uint16                 `json:"livelogPUTPort"`
	NumberOfTasksToRun             uint                   `json:"numberOfTasksToRun"`
	PrivateIP                      net.IP                 `json:"privateIP"`
	ProvisionerBaseURL             string                 `json:"provisionerBaseURL"`
	ProvisionerID                  string                 `json:"provisionerId"`
	PublicIP                       net.IP                 `json:"publicIP"`
	PurgeCacheBaseURL              string                 `json:"purgeCacheBaseURL"`
	QueueBaseURL                   string                 `json:"queueBaseURL"`
	Region                         string                 `json:"region"`
	RequiredDiskSpaceMegabytes     uint                   `json:"requiredDiskSpaceMegabytes"`
	RootURL                        string                 `json:"rootURL"`
	RunAfterUserCreation           string                 `json:"runAfterUserCreation"`
	SecretsBaseURL                 string                 `json:"secretsBaseURL"`
	SentryProject                  string                 `json:"sentryProject"`
	ShutdownMachineOnIdle          bool                   `json:"shutdownMachineOnIdle"`
	ShutdownMachineOnInternalError bool                   `json:"shutdownMachineOnInternalError"`
	Subdomain                      string                 `json:"subdomain"`
	TaskclusterProxyExecutable     string                 `json:"taskclusterProxyExecutable"`
	TaskclusterProxyPort           uint16                 `json:"taskclusterProxyPort"`
	TasksDir                       string                 `json:"tasksDir"`
	WorkerGroup                    string                 `json:"workerGroup"`
	WorkerID                       string                 `json:"workerId"`
	WorkerManagerBaseURL           string                 `json:"workerManagerBaseURL"`
	WorkerType                     string                 `json:"workerType"`
	WorkerTypeMetadata             map[string]interface{} `json:"workerTypeMetadata"`
	WSTAudience                    string                 `json:"wstAudience"`
	WSTServerURL                   string                 `json:"wstServerURL"`
}

Jump to

Keyboard shortcuts

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