v1

package
v0.0.0-...-45a9bcf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Overview

Package v1 contains the types of the Cluster Agent API (v1).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapStringSet

type MapStringSet map[string]sets.Set[string]

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL