Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptySrc = errors.New("empty src template")
ErrEmptySrc is returned if an emty src template is passed to NewResource
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { easyKV.ReadWatcher Name string Onetime bool Watch bool Prefix string Interval int Keys []string // contains filtered or unexported fields }
Backend is the representation of a template backend like etcd or consul
type BackendConfig ¶
A BackendConfig - Every backend implements this interface. If Connect is called a new connection to the underlaying kv-store will be established. Connect should also set the name and the StoreClient of the Backend. The other values of Backend will be loaded from the configuration file.
type Renderer ¶ added in v0.7.0
type Renderer struct { Src string `json:"src"` Dst string `json:"dst"` Mode string `json:"mode"` UID int `json:"uid"` GID int `json:"gid"` ReloadCmd string `toml:"reload_cmd" json:"reload_cmd"` CheckCmd string `toml:"check_cmd" json:"check_cmd"` ReapLock *sync.RWMutex // contains filtered or unexported fields }
Renderer contains all data needed for the template processing
type Resource ¶
type Resource struct { SignalChan chan os.Signal Failed bool // contains filtered or unexported fields }
Resource is the representation of a parsed template resource.
func NewResource ¶
func NewResource(backends []Backend, sources []*Renderer, name string, exec executor.Executor) (*Resource, error)
NewResource creates a Resource.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.