Documentation
¶
Overview ¶
Package discovery publishes the service directory to every node (§8.1, §8.6): stable service VIPs with their backends, and internal DNS records.
Index ¶
- Constants
- func SearchDomains(sv store.Service) []string
- func ServiceName(sv store.Service) string
- func VIPAddr(i int) netip.Addr
- type Directory
- type Manager
- func (m *Manager) Backends() map[string]int
- func (m *Manager) Build(ctx context.Context) (*agentv1.Discovery, map[string]string, error)
- func (m *Manager) Hooks() agentgw.Hooks
- func (m *Manager) Kick()
- func (m *Manager) Records() []*agentv1.DNSRecord
- func (m *Manager) Run(ctx context.Context)
- func (m *Manager) VIP(serviceID string) string
Constants ¶
const Zone = "syncloud.internal"
Zone is the internal DNS zone.
Variables ¶
This section is empty.
Functions ¶
func SearchDomains ¶
SearchDomains let tasks use short names within their environment.
func ServiceName ¶
ServiceName is a service's DNS name: <service>.<env>.<project>.syncloud.internal.
Types ¶
type Directory ¶
type Directory interface {
Directory(ctx context.Context, vip func(index int) string, pool store.IndexPool, cooldown time.Duration) ([]*agentv1.VirtualService, []*agentv1.DNSRecord)
}
Directory contributes VIPs and DNS records from outside services.
type Manager ¶
type Manager struct {
// Security compiles security groups into the directory (§8.3).
Security bool
// Databases adds managed databases' VIPs and names (Phase 12); may be nil.
Databases Directory
// contains filtered or unexported fields
}