Documentation ¶
Index ¶
- type MapStringSet
- type MetadataResponse
- type MetadataResponseBundle
- type NamespacesPodsStringsSet
- func (m NamespacesPodsStringsSet) DeepCopy(old *NamespacesPodsStringsSet) NamespacesPodsStringsSet
- func (m NamespacesPodsStringsSet) Delete(namespace string, strings ...string)
- func (m NamespacesPodsStringsSet) Get(namespace, podName string) ([]string, bool)
- func (m NamespacesPodsStringsSet) Set(namespace, podName string, strings ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapStringSet ¶
MapStringSet maps a set of string by a string key
type MetadataResponse ¶
type MetadataResponse struct { Nodes map[string]*MetadataResponseBundle `json:"Nodes,omitempty"` // Nodes with uppercase for backward compatibility Warnings []string `json:"Warnings,omitempty"` // Warnings with uppercase for backward compatibility Errors string `json:"Errors,omitempty"` // Errors with uppercase for backward compatibility }
MetadataResponse use to encore /api/v1/tags payloads
func NewMetadataResponse ¶
func NewMetadataResponse() *MetadataResponse
NewMetadataResponse returns new NewMetadataResponse initialized instance
type MetadataResponseBundle ¶
type MetadataResponseBundle struct { // Services maps pod names to the names of the services targeting the pod. // keyed by the namespace a pod belongs to. Services NamespacesPodsStringsSet `json:"services,omitempty"` }
MetadataResponseBundle maps pod names to associated metadata.
func NewMetadataResponseBundle ¶
func NewMetadataResponseBundle() *MetadataResponseBundle
NewMetadataResponseBundle returns new MetadataResponseBundle initialized instance
type NamespacesPodsStringsSet ¶
type NamespacesPodsStringsSet map[string]MapStringSet
NamespacesPodsStringsSet maps pod names to a set of strings keyed by the namespace a pod belongs to. This data structure allows for O(1) lookups of services given a namespace and pod name.
The data is stored in the following schema:
{ "namespace1": { "pod": { "svc1": {}, "svc2": {}, "svc3": {} ] }, "namespace2": { "pod2": [ "svc1": {}, "svc2": {}, "svc3": {} ] } }
func NewNamespacesPodsStringsSet ¶
func NewNamespacesPodsStringsSet() NamespacesPodsStringsSet
NewNamespacesPodsStringsSet return new initialized NamespacesPodsStringsSet instance
func (NamespacesPodsStringsSet) DeepCopy ¶
func (m NamespacesPodsStringsSet) DeepCopy(old *NamespacesPodsStringsSet) NamespacesPodsStringsSet
DeepCopy used to copy NamespacesPodsStringsSet in another NamespacesPodsStringsSet
func (NamespacesPodsStringsSet) Delete ¶
func (m NamespacesPodsStringsSet) Delete(namespace string, strings ...string)
Delete deletes strings for a given namespace.
func (NamespacesPodsStringsSet) Get ¶
func (m NamespacesPodsStringsSet) Get(namespace, podName string) ([]string, bool)
Get returns the list of strings for a given namespace and pod name.
func (NamespacesPodsStringsSet) Set ¶
func (m NamespacesPodsStringsSet) Set(namespace, podName string, strings ...string)
Set updates strings for a given namespace and pod name.