Documentation ¶
Index ¶
- type NameTemplate
- func (t *NameTemplate) GetNamespaceFromSegmentArray(segments []string) string
- func (t *NameTemplate) GetRecordNameFromNameValues(values NameValues) string
- func (t *NameTemplate) GetServiceFromSegmentArray(segments []string) string
- func (t *NameTemplate) GetSymbolFromSegmentArray(symbol string, segments []string) string
- func (t *NameTemplate) GetTypeFromSegmentArray(segments []string) string
- func (t *NameTemplate) GetZoneFromSegmentArray(segments []string) string
- func (t *NameTemplate) IsValid() bool
- func (t *NameTemplate) SetTemplate(s string) error
- type NameValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NameTemplate ¶
type NameTemplate struct { // Element is a map of element name :: index in the segmented record name for the named element Element map[string]int // contains filtered or unexported fields }
TODO: possibly need to store length of segmented format to handle cases
where query string segments to a shorter or longer list than the template. When query string segments to shorter than template: * either wildcards are being used, or * we are not looking up an A, AAAA, or SRV record (eg NS), or * we can just short-circuit failure before hitting the k8s API. Where the query string is longer than the template, need to define which symbol consumes the other segments. Most likely this would be the servicename. Also consider how to handle static strings in the format template.
func (*NameTemplate) GetNamespaceFromSegmentArray ¶
func (t *NameTemplate) GetNamespaceFromSegmentArray(segments []string) string
func (*NameTemplate) GetRecordNameFromNameValues ¶
func (t *NameTemplate) GetRecordNameFromNameValues(values NameValues) string
GetRecordNameFromNameValues returns the string produced by applying the values to the NameTemplate format string.
func (*NameTemplate) GetServiceFromSegmentArray ¶
func (t *NameTemplate) GetServiceFromSegmentArray(segments []string) string
func (*NameTemplate) GetSymbolFromSegmentArray ¶
func (t *NameTemplate) GetSymbolFromSegmentArray(symbol string, segments []string) string
func (*NameTemplate) GetTypeFromSegmentArray ¶
func (t *NameTemplate) GetTypeFromSegmentArray(segments []string) string
func (*NameTemplate) GetZoneFromSegmentArray ¶
func (t *NameTemplate) GetZoneFromSegmentArray(segments []string) string
func (*NameTemplate) IsValid ¶
func (t *NameTemplate) IsValid() bool
func (*NameTemplate) SetTemplate ¶
func (t *NameTemplate) SetTemplate(s string) error
Click to show internal directories.
Click to hide internal directories.