configentry

package
v1.10.10 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryChainSet

DiscoveryChainSet is a wrapped set of raw cross-referenced config entries necessary for the DiscoveryChain.Get RPC process.

None of these are defaulted.

func NewDiscoveryChainSet

func NewDiscoveryChainSet() *DiscoveryChainSet

func (*DiscoveryChainSet) AddEntries

func (e *DiscoveryChainSet) AddEntries(entries ...structs.ConfigEntry)

AddEntries adds generic configs. Convenience function for testing. Panics on operator error.

func (*DiscoveryChainSet) AddResolvers

func (e *DiscoveryChainSet) AddResolvers(entries ...*structs.ServiceResolverConfigEntry)

AddResolvers adds resolver configs. Convenience function for testing.

func (*DiscoveryChainSet) AddRouters

func (e *DiscoveryChainSet) AddRouters(entries ...*structs.ServiceRouterConfigEntry)

AddRouters adds router configs. Convenience function for testing.

func (*DiscoveryChainSet) AddServices

func (e *DiscoveryChainSet) AddServices(entries ...*structs.ServiceConfigEntry)

AddServices adds service configs. Convenience function for testing.

func (*DiscoveryChainSet) AddSplitters

func (e *DiscoveryChainSet) AddSplitters(entries ...*structs.ServiceSplitterConfigEntry)

AddSplitters adds splitter configs. Convenience function for testing.

func (*DiscoveryChainSet) GetResolver

func (*DiscoveryChainSet) GetRouter

func (*DiscoveryChainSet) GetService

func (*DiscoveryChainSet) GetSplitter

func (*DiscoveryChainSet) IsChainEmpty

func (e *DiscoveryChainSet) IsChainEmpty() bool

IsChainEmpty returns true if there are no service-routers, service-splitters, or service-resolvers that are present. These config entries are the primary parts of the discovery chain.

func (*DiscoveryChainSet) IsEmpty

func (e *DiscoveryChainSet) IsEmpty() bool

IsEmpty returns true if there are no config entries at all in the response. You should prefer this over IsChainEmpty() in most cases.

type KindName

type KindName struct {
	Kind string
	Name string
	structs.EnterpriseMeta
}

KindName is a value type useful for maps. You can use:

map[KindName]Payload

instead of:

map[string]map[string]Payload

func NewKindName

func NewKindName(kind, name string, entMeta *structs.EnterpriseMeta) KindName

NewKindName returns a new KindName. The EnterpriseMeta values will be normalized based on the kind.

Any caller which modifies the EnterpriseMeta field must call Normalize before persisting or using the value as a map key.

func NewKindNameForEntry

func NewKindNameForEntry(entry structs.ConfigEntry) KindName

type ResolvedServiceConfigSet

type ResolvedServiceConfigSet struct {
	ServiceDefaults map[structs.ServiceID]*structs.ServiceConfigEntry
	GlobalProxy     *structs.ProxyConfigEntry
}

ResolvedServiceConfigSet is a wrapped set of raw cross-referenced config entries necessary for the ConfigEntry.ResolveServiceConfig RPC process.

None of these are defaulted.

func (*ResolvedServiceConfigSet) AddProxyDefaults

func (r *ResolvedServiceConfigSet) AddProxyDefaults(entry *structs.ProxyConfigEntry)

func (*ResolvedServiceConfigSet) AddServiceDefaults

func (r *ResolvedServiceConfigSet) AddServiceDefaults(entry *structs.ServiceConfigEntry)

func (*ResolvedServiceConfigSet) GetServiceDefaults

func (*ResolvedServiceConfigSet) IsEmpty

func (r *ResolvedServiceConfigSet) IsEmpty() bool

Jump to

Keyboard shortcuts

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