datadog-agent: github.com/DataDog/datadog-agent/pkg/clusteragent/api/v1 Index | Files

package v1

import "github.com/DataDog/datadog-agent/pkg/clusteragent/api/v1"

Index

Package Files

types.go

type MapStringSet Uses

type MapStringSet map[string]sets.String

MapStringSet maps a set of string by a string key

type MetadataResponse Uses

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 Uses

func NewMetadataResponse() *MetadataResponse

NewMetadataResponse returns new NewMetadataResponse initialized instance

type MetadataResponseBundle Uses

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 Uses

func NewMetadataResponseBundle() *MetadataResponseBundle

NewMetadataResponseBundle returns new MetadataResponseBundle initialized instance

type NamespacesPodsStringsSet Uses

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 Uses

func NewNamespacesPodsStringsSet() NamespacesPodsStringsSet

NewNamespacesPodsStringsSet return new initialized NamespacesPodsStringsSet instance

func (NamespacesPodsStringsSet) DeepCopy Uses

func (m NamespacesPodsStringsSet) DeepCopy(old *NamespacesPodsStringsSet) NamespacesPodsStringsSet

DeepCopy used to copy NamespacesPodsStringsSet in another NamespacesPodsStringsSet

func (NamespacesPodsStringsSet) Delete Uses

func (m NamespacesPodsStringsSet) Delete(namespace string, strings ...string)

Delete deletes strings for a given namespace.

func (NamespacesPodsStringsSet) Get Uses

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 Uses

func (m NamespacesPodsStringsSet) Set(namespace, podName string, strings ...string)

Set updates strings for a given namespace and pod name.

Package v1 imports 1 packages (graph) and is imported by 3 packages. Updated 2020-01-03. Refresh now. Tools for package owners.