Documentation
¶
Index ¶
- Constants
- type Config
- func (c *Config) KubernetesClient() (*authenticate.KubernetesInterface, error)
- func (c *Config) KubernetesClientFactory(token string) (kubernetes.Interface, error)
- func (c *Config) LogServiceClient() (plspb.LogClient, error)
- func (c *Config) SampleConfig() (*SampleConfig, error)
- func (c *Config) VaultTransitClient() (*vaultapi.Client, error)
- type SampleConfig
- type SampleConfigConnections
- type SampleConfigEnvironment
- type SampleConfigRun
- type SampleConfigSpec
- type SampleConfigStep
- type SampleConfigTrigger
Constants ¶
View Source
const ( DefaultListenPort = 7000 DefaultVaultURL = "http://localhost:8200" DefaultStepMetadataURL = "https://relay.sh/step-metadata.json" DefaultKubernetesAutomountTokenFile = "/var/run/secrets/kubernetes.io/serviceaccount/token" DefaultKubernetesAutomountCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Debug determines whether this server starts with debugging enabled.
Debug bool
// Environment is the execution environment for this instance. Used for
// reporting errors.
Environment string
// ListenPort is the port to bind the server to.
ListenPort int
// TLSKeyFile is the relative path to a PEM-encoded X509 private key to
// enable TLS.
TLSKeyFile string
// TLSCertFile is the relative path to a PEM-encoded X509 certificate
// bundle corresponding to the private key.
TLSCertificateFile string
// LogServiceURL is the HTTP(S) url to the log service
LogServiceURL string
// StepMetadataURL is the HTTP(S) url to the relaysh core step metadata
// json file.
StepMetadataURL string
// VaultTransitURL is the HTTP(S) URL to the Vault server to use for secure
// token decryption.
VaultTransitURL string
// VaultTransitToken is the token to use to authenticate transit requests.
VaultTransitToken string
// VaultTransitPath is the path to the transit secrets engine providing
// token decryption.
VaultTransitPath string
// VaultTransitKey is the key to use for token decryption.
VaultTransitKey string
// VaultAuthURL is the HTTP(S) URL to the Vault server to use for
// authenticating tenants.
VaultAuthURL string
// VaultAuthPath is the path to the JWT secrets engine providing
// authentication for tenants.
VaultAuthPath string
// VaultAuthRole is the role to use when logging in as a tenant.
VaultAuthRole string
// KubernetesURL is the the HTTP(S) URL to the Kubernetes cluster master.
KubernetesURL string
// KubernetesCAData is certificate authority data for the Kubernetes cluster
// to connect to.
KubernetesCAData string
// KubernetesServiceAccountToken is the service account token to use for
// reading pod data.
KubernetesServiceAccountToken string
// SampleConfigFiles is a list of configuration files that configure this
// instance of the metadata API to serve sample data for demo or testing
// purposes.
SampleConfigFiles []string
// SampleHS256SigningKey is a base64-encoded signing key for handling JWTs
// from sample steps.
SampleHS256SigningKey string
// SentryDSN is an optional identifier to automatically log API errors to
// Sentry.
SentryDSN string
}
func (*Config) KubernetesClient ¶
func (c *Config) KubernetesClient() (*authenticate.KubernetesInterface, error)
func (*Config) KubernetesClientFactory ¶
func (c *Config) KubernetesClientFactory(token string) (kubernetes.Interface, error)
func (*Config) SampleConfig ¶
func (c *Config) SampleConfig() (*SampleConfig, error)
type SampleConfig ¶
type SampleConfig struct {
Connections SampleConfigConnections `yaml:"connections"`
Secrets map[string]string `yaml:"secrets"`
Runs map[string]*SampleConfigRun `yaml:"runs"`
Triggers map[string]*SampleConfigTrigger `yaml:"triggers"`
}
func (*SampleConfig) AppendTo ¶
func (sc *SampleConfig) AppendTo(other *SampleConfig)
type SampleConfigConnections ¶
type SampleConfigConnections map[memory.ConnectionKey]map[string]interface{}
func (*SampleConfigConnections) UnmarshalYAML ¶
func (scc *SampleConfigConnections) UnmarshalYAML(value *yaml.Node) error
type SampleConfigEnvironment ¶
func (SampleConfigEnvironment) Interface ¶
func (sp SampleConfigEnvironment) Interface() map[string]interface{}
type SampleConfigRun ¶
type SampleConfigRun struct {
Parameters map[string]interface{} `yaml:"parameters"`
Steps map[string]*SampleConfigStep `yaml:"steps"`
}
type SampleConfigSpec ¶
func (SampleConfigSpec) Interface ¶
func (sp SampleConfigSpec) Interface() map[string]interface{}
type SampleConfigStep ¶
type SampleConfigStep struct {
Conditions spec.YAMLTree `yaml:"conditions"`
Env SampleConfigEnvironment `yaml:"env"`
Spec SampleConfigSpec `yaml:"spec"`
Image string `yaml:"image"`
Outputs map[string]interface{} `yaml:"outputs"`
State map[string]interface{} `yaml:"state"`
}
type SampleConfigTrigger ¶
type SampleConfigTrigger struct{}
Click to show internal directories.
Click to hide internal directories.