templates

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DepSizeWarning = 128

DepSizeWarning is the threshold of dependencies that we warn the user of CTS potentially DDoSing their Consul cluster.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver interface {
	Run(tmpl hcat.Templater, w hcat.Watcherer) (hcat.ResolveEvent, error)
}

Resolver describes the interface for hashicat's Resolver structure which does implement any hashicat interface at time of writing https://github.com/hashicorp/hcat

type Template

type Template interface {
	// Notify has a different behavior than hcat.Template.Notify and does
	// not mark the template as dirty unless hcat.Template.Notify is called
	// within the implementation
	Notify(interface{}) bool
	Render(content []byte) (hcat.RenderResult, error)
	Execute(hcat.Recaller) ([]byte, error)
	ID() string
}

Template describes the interface for hashicat's Template structure which implements the interfaces Templater and Renderer https://github.com/hashicorp/hcat

type Watcher

type Watcher interface {
	Watch(context.Context, chan string) error
	WaitCh(context.Context) <-chan error
	Buffering(hcat.Notifier) bool
	BufferReset(hcat.Notifier)
	MarkForSweep(notifier hcat.IDer)
	SetBufferPeriod(min, max time.Duration, tmplIDs ...string)
	Size() int
	Stop()
	Sweep(notifier hcat.IDer)
	Register(ns ...hcat.Notifier) error
	Deregister(ns ...hcat.Notifier)
	Clients() hcat.Looker

	// not used but needed to meet the hcat.Watcherer interface
	Complete(hcat.Notifier) bool
	Recaller(hcat.Notifier) hcat.Recaller
}

Watcher describes the interface for hashicat's Watcher structure used by this project https://github.com/hashicorp/hcat

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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