Documentation ¶
Index ¶
- func ExpBackoff(last time.Duration, max time.Duration) (next time.Duration)
- func ListDirectory(dir string, filterFunc func(string) bool) ([]string, error)
- func NewThreadsafeSet(values ...string) *tsafeSet
- func NewUnsafeSet(values ...string) *unsafeSet
- func ParseFilepath(path string) string
- func ReadTLSConfigFiles(cafile, certfile, keyfile string) (cfg *tls.Config, err error)
- func TrimToDashes(args []string) []string
- type Event
- type EventStream
- type LoggingHTTPTransport
- type PeriodicReconciler
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListDirectory ¶
ListDirectory generates a slice of all the file names that both exist in the provided directory and pass the filter. The returned file names are relative to the directory argument. filterFunc is called once for each file found in the directory. If filterFunc returns true, the given file will ignored.
func NewThreadsafeSet ¶
func NewThreadsafeSet(values ...string) *tsafeSet
func NewUnsafeSet ¶
func NewUnsafeSet(values ...string) *unsafeSet
func ParseFilepath ¶
ParseFilepath expands ~ and ~user constructions. If user or $HOME is unknown, do nothing.
func ReadTLSConfigFiles ¶
func TrimToDashes ¶
TrimToDashes takes a slice of strings (e.g. a command line) and returns everything after the first double dash (--), if any are present
Types ¶
type EventStream ¶
type EventStream interface {
Next(stop chan struct{}) chan Event
}
EventStream generates a channel which will emit an event as soon as one of interest occurs. Any background operation associated with the channel should be terminated when stop is closed.
type LoggingHTTPTransport ¶
type PeriodicReconciler ¶
type PeriodicReconciler interface {
Run(stop chan bool)
}
func NewPeriodicReconciler ¶
func NewPeriodicReconciler(interval time.Duration, recFunc func(), eStream EventStream) PeriodicReconciler
NewPeriodicReconciler creates a PeriodicReconciler that will run recFunc at least every ival, or in response to anything emitted from EventStream.Next()