Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxTemplateEventRate is the default maximum rate at which a // template event should be fired. DefaultMaxTemplateEventRate = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskTemplateManager ¶
type TaskTemplateManager struct {
// contains filtered or unexported fields
}
TaskTemplateManager is used to run a set of templates for a given task
func NewTaskTemplateManager ¶
func NewTaskTemplateManager(config *TaskTemplateManagerConfig) (*TaskTemplateManager, error)
func (*TaskTemplateManager) SetDriverHandle ¶ added in v1.3.4
func (tm *TaskTemplateManager) SetDriverHandle(executor interfaces.ScriptExecutor)
SetDriverHandle sets the executor
func (*TaskTemplateManager) Stop ¶
func (tm *TaskTemplateManager) Stop()
Stop is used to stop the consul-template runner
type TaskTemplateManagerConfig ¶
type TaskTemplateManagerConfig struct { // UnblockCh is closed when the template has been rendered UnblockCh chan struct{} // Lifecycle is used to interact with the task the template manager is being // run for Lifecycle interfaces.TaskLifecycle // Events is used to emit events for the task Events interfaces.EventEmitter // Templates is the set of templates we are managing Templates []*structs.Template // ClientConfig is the Nomad Client configuration ClientConfig *config.Config // ConsulNamespace is the Consul namespace for the task ConsulNamespace string // VaultToken is the Vault token for the task. VaultToken string // VaultNamespace is the Vault namespace for the task VaultNamespace string // TaskDir is the task's directory TaskDir string // EnvBuilder is the environment variable builder for the task. EnvBuilder *taskenv.Builder // MaxTemplateEventRate is the maximum rate at which we should emit events. MaxTemplateEventRate time.Duration // NomadNamespace is the Nomad namespace for the task NomadNamespace string // NomadToken is the Nomad token or identity claim for the task NomadToken string }
TaskTemplateManagerConfig is used to configure an instance of the TaskTemplateManager
func (*TaskTemplateManagerConfig) Validate ¶
func (c *TaskTemplateManagerConfig) Validate() error
Validate validates the configuration.
Click to show internal directories.
Click to hide internal directories.