Documentation
¶
Index ¶
- Variables
- func WatchACLConfig(kv *api.KV, key string) watch.Watchable[*ACL]
- func WatchCaddyConfig(kv *api.KV, key string) watch.Watchable[*caddy.Config]
- func WatchConsulCatalog(catalog *api.Catalog, cfg service.ExtractConfig) watch.Watchable[service.Map]
- func WatchConsulKey(kv *api.KV, key string) watch.Watchable[*api.KVPair]
- func WatchConsulPrefix(kv *api.KV, prefix string) watch.Watchable[[]*api.KVPair]
- func WatchStaticServices(kv *api.KV, prefix string) watch.Watchable[service.Map]
- func WatchZoneConfig(kv *api.KV, key string) watch.Watchable[*Zone]
- type ACL
- type ConsulConfig
- type ErrorHandler
- type KeyConfig
- type RemoteConfig
- type TagConfig
- type Watcher
- type Zone
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultACLPolicy = acl.MustParsePolicy("allow " + acl.Wildcard)
Functions ¶
func WatchCaddyConfig ¶
func WatchConsulCatalog ¶
func WatchConsulPrefix ¶
func WatchStaticServices ¶
Types ¶
type ACL ¶
type ACL struct {
Networks map[string]acl.Network
Groups map[string][]string
DefaultPolicy acl.Policy
DefaultAction acl.Action
}
func DefaultACLConfig ¶
func DefaultACLConfig() *ACL
func (*ACL) UnmarshalJSON ¶
type ConsulConfig ¶
type ConsulConfig struct {
Endpoint *url.URL
Token string
GlobalConfigPrefix string
Tags TagConfig
Keys KeyConfig
}
func DefaultConsulConfig ¶
func DefaultConsulConfig() *ConsulConfig
func (*ConsulConfig) UnmarshalJSON ¶
func (c *ConsulConfig) UnmarshalJSON(data []byte) error
type KeyConfig ¶
type KeyConfig struct {
Name string `json:"name"`
Zone string `json:"zone"`
ACL string `json:"acl"`
Proxy string `json:"proxy"`
}
func DefaultKeyConfig ¶
func DefaultKeyConfig() KeyConfig
type RemoteConfig ¶
type TagConfig ¶
func DefaultTagConfig ¶
func DefaultTagConfig() TagConfig
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func NewWatcher(onChange func(RemoteConfig) bool, onError ErrorHandler) *Watcher
Click to show internal directories.
Click to hide internal directories.