Documentation
¶
Overview ¶
Package daemon configures and starts the otfd daemon and its subsystems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSecretLength = errors.New("secret must be 16 bytes in size")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RunnerConfig *runner.Config
CacheConfig *inmem.CacheConfig
GithubHostname string
GithubClientID string
GithubClientSecret string
GitlabHostname string
GitlabClientID string
GitlabClientSecret string
ForgejoHostname string // TODO: forgejo is often self-hosted, and there may be more than one of them. this should be a per-VCS setting
OIDC authenticator.OIDCConfig
Secret []byte // 16-byte secret for signing URLs and encrypting payloads
SiteToken string
Host string
WebhookHost string
Address string
Database string
AllowedOrigins string
MaxConfigSize int64
SSL bool
CertFile, KeyFile string
EnableRequestLogging bool
DisableScheduler bool
DisableRunner bool
RestrictOrganizationCreation bool
SiteAdmins []string
SkipTLSVerification bool
// skip checks for latest terraform version
DisableLatestChecker *bool
PlanningTimeout time.Duration
ApplyingTimeout time.Duration
OverrideTimeoutCheckInterval time.Duration
DefaultEngine *engine.Engine
tokens.GoogleIAPConfig
}
Config configures the otfd daemon. Descriptions of each field can be found in the flag definitions in ./cmd/otfd
type Daemon ¶
type Daemon struct {
Config
logr.Logger
*sql.DB
Organizations *organization.Service
Runs *run.Service
Workspaces *workspace.Service
Variables *variable.Service
Notifications *notifications.Service
State *state.Service
Configs *configversion.Service
Modules *module.Service
VCSProviders *vcs.Service
Tokens *tokens.Service
Teams *team.Service
Users *user.Service
GithubApp *github.Service
RepoHooks *repohooks.Service
Runners *runner.Service
Connections *connections.Service
System *internal.HostnameService
// contains filtered or unexported fields
}
type Startable ¶
Startable is a blocking process that is started at least once, and upon error, may need re-starting.
type Subsystem ¶
type Subsystem struct {
// Name of subsystem
Name string
// System is the underlying system to be invoked and supervised.
System Startable
// DB for obtaining cluster-wide lock. Must be non-nil if LockID is
// non-nil
DB subsystemDB
// Cluster-unique lock ID. If non-nil then only one instance of this
// subsystem will run on an OTF cluster. If non-nil then DB must also be
// non-nil.
LockID *int64
logr.Logger
}
Subsystem is an automonous system subordinate to the main daemon (otfd).
Click to show internal directories.
Click to hide internal directories.