Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigKey(mesh string) string
- func MeshFromConfigKey(name string) (string, bool)
- type Change
- type ChangeType
- type EntryType
- type GlobalView
- type HostnameEntry
- type OutboundEntry
- type Persistence
- type VirtualOutbound
- type VirtualOutboundMeshView
- func (vo *VirtualOutboundMeshView) Add(entry HostnameEntry, outbound OutboundEntry) error
- func (vo *VirtualOutboundMeshView) DeleteByOrigin(origin string)
- func (vo *VirtualOutboundMeshView) Get(entry HostnameEntry) *VirtualOutbound
- func (vo *VirtualOutboundMeshView) HostnameEntries() []HostnameEntry
- func (vo *VirtualOutboundMeshView) Update(new *VirtualOutboundMeshView) (changes []Change, out *VirtualOutboundMeshView)
Constants ¶
View Source
const ( OriginHost = "host" OriginService = "service" OriginKube = "kubernetes" )
View Source
const ( Add = ChangeType("Add") Remove = ChangeType("Remove") Modify = ChangeType("Modify") )
Variables ¶
View Source
var OriginVirtualOutbound = func(name string) string { return "virtual-outbound:" + name }
Functions ¶
func MeshFromConfigKey ¶
Types ¶
type Change ¶ added in v1.8.1
type Change struct { Type ChangeType Entry HostnameEntry }
type ChangeType ¶ added in v1.8.1
type ChangeType string
type GlobalView ¶ added in v1.8.1
type GlobalView struct {
// contains filtered or unexported fields
}
GlobalView keeps a list of all hostname/ips and add the possibility to allocate new ips
func NewGlobalView ¶ added in v1.8.1
func NewGlobalView(cidr string) (*GlobalView, error)
func (*GlobalView) Allocate ¶ added in v1.8.1
func (g *GlobalView) Allocate(hostname HostnameEntry) (string, error)
Allocate assign an ip to a host
func (*GlobalView) Reserve ¶ added in v1.8.1
func (g *GlobalView) Reserve(hostname HostnameEntry, ip string) error
Reserve add an ip/host to the list of reserved ips (useful when loading an existing view).
func (*GlobalView) ToVIPMap ¶ added in v1.8.1
func (g *GlobalView) ToVIPMap() map[HostnameEntry]string
type HostnameEntry ¶ added in v1.8.1
HostnameEntry is the definition of a DNS entry. The type indicates where the entry comes from (.e.g: Service is auto-generated, FullyQualifiedDomain comes from `virtual-outbound` policies...)
func NewFqdnEntry ¶ added in v1.8.1
func NewFqdnEntry(name string) HostnameEntry
func NewHostEntry ¶ added in v1.8.1
func NewHostEntry(host string) HostnameEntry
func NewServiceEntry ¶ added in v1.8.1
func NewServiceEntry(name string) HostnameEntry
func (*HostnameEntry) Less ¶ added in v1.8.1
func (e *HostnameEntry) Less(o *HostnameEntry) bool
func (HostnameEntry) MarshalText ¶ added in v1.8.1
func (e HostnameEntry) MarshalText() (text []byte, err error)
func (HostnameEntry) String ¶ added in v1.8.1
func (e HostnameEntry) String() string
func (*HostnameEntry) UnmarshalText ¶ added in v1.8.1
func (e *HostnameEntry) UnmarshalText(text []byte) error
type OutboundEntry ¶ added in v1.8.1
type OutboundEntry struct { Port uint32 TagSet map[string]string // A string to identify where this outbound was defined (usually the name of the outbound policy) Origin string }
func (*OutboundEntry) Less ¶ added in v1.8.1
func (mo *OutboundEntry) Less(o *OutboundEntry) bool
func (*OutboundEntry) String ¶ added in v1.8.1
func (mo *OutboundEntry) String() string
type Persistence ¶
type Persistence struct {
// contains filtered or unexported fields
}
func NewPersistence ¶
func NewPersistence(resourceManager manager.ReadOnlyResourceManager, configManager config_manager.ConfigManager) *Persistence
func (*Persistence) GetByMesh ¶
func (m *Persistence) GetByMesh(ctx context.Context, mesh string) (*VirtualOutboundMeshView, error)
func (*Persistence) Set ¶
func (m *Persistence) Set(ctx context.Context, mesh string, vips *VirtualOutboundMeshView) error
type VirtualOutbound ¶ added in v1.8.1
type VirtualOutbound struct { // This is not default in the legacy case (hostnames won't be complete) Address string `json:"address,omitempty"` Outbounds []OutboundEntry `json:"outbounds,omitempty"` }
VirtualOutbound the description of a hostname -> address and a list of port/tagSet that identifies each outbound.
func (*VirtualOutbound) Equal ¶ added in v1.8.1
func (vo *VirtualOutbound) Equal(other *VirtualOutbound) bool
type VirtualOutboundMeshView ¶ added in v1.8.1
type VirtualOutboundMeshView struct {
// contains filtered or unexported fields
}
func NewEmptyVirtualOutboundView ¶ added in v1.8.1
func NewEmptyVirtualOutboundView() *VirtualOutboundMeshView
func NewVirtualOutboundView ¶ added in v1.8.1
func NewVirtualOutboundView(all map[HostnameEntry]VirtualOutbound) (*VirtualOutboundMeshView, error)
func (*VirtualOutboundMeshView) Add ¶ added in v1.8.1
func (vo *VirtualOutboundMeshView) Add(entry HostnameEntry, outbound OutboundEntry) error
func (*VirtualOutboundMeshView) DeleteByOrigin ¶ added in v1.8.1
func (vo *VirtualOutboundMeshView) DeleteByOrigin(origin string)
func (*VirtualOutboundMeshView) Get ¶ added in v1.8.1
func (vo *VirtualOutboundMeshView) Get(entry HostnameEntry) *VirtualOutbound
func (*VirtualOutboundMeshView) HostnameEntries ¶ added in v1.8.1
func (vo *VirtualOutboundMeshView) HostnameEntries() []HostnameEntry
func (*VirtualOutboundMeshView) Update ¶ added in v1.8.1
func (vo *VirtualOutboundMeshView) Update(new *VirtualOutboundMeshView) (changes []Change, out *VirtualOutboundMeshView)
Update merges `new` and `vo` in a new `out` and returns a list of changes.
Click to show internal directories.
Click to hide internal directories.