cilium: github.com/cilium/cilium/pkg/service/store Index | Files

package store

import "github.com/cilium/cilium/pkg/service/store"

Index

Package Files

store.go zz_generated.deepcopy.go

Variables

var (
    // ServiceStorePrefix is the kvstore prefix of the shared store
    //
    // WARNING - STABLE API: Changing the structure or values of this will
    // break backwards compatibility
    ServiceStorePrefix = path.Join(kvstore.BaseKeyPrefix, "state", "services", "v1")
)

type ClusterService Uses

type ClusterService struct {
    // Cluster is the cluster name the service is configured in
    Cluster string `json:"cluster"`

    // Namespace is the cluster namespace the service is configured in
    Namespace string `json:"namespace"`

    // Name is the name of the service. It must be unique within the
    // namespace of the cluster
    Name string `json:"name"`

    // Frontends is a map indexed by the frontend IP address
    Frontends map[string]PortConfiguration `json:"frontends"`

    // Backends is is map indexed by the backend IP address
    Backends map[string]PortConfiguration `json:"backends"`

    // Labels are the labels of the service
    Labels map[string]string `json:"labels"`

    // Selector is the label selector used to select backends
    Selector map[string]string `json:"selector"`
}

ClusterService is the definition of a service in a cluster

WARNING - STABLE API: Any change to this structure must be done in a backwards compatible way.

+k8s:deepcopy-gen=true

func NewClusterService Uses

func NewClusterService(name, namespace string) ClusterService

NewClusterService returns a new cluster service definition

func (*ClusterService) DeepCopy Uses

func (in *ClusterService) DeepCopy() *ClusterService

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterService.

func (*ClusterService) DeepCopyInto Uses

func (in *ClusterService) DeepCopyInto(out *ClusterService)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterService) DeepKeyCopy Uses

func (s *ClusterService) DeepKeyCopy() store.LocalKey

DeepKeyCopy creates a deep copy of the LocalKey

func (*ClusterService) GetKeyName Uses

func (s *ClusterService) GetKeyName() string

GetKeyName returns the kvstore key to be used for the global service

func (*ClusterService) Marshal Uses

func (s *ClusterService) Marshal() ([]byte, error)

Marshal returns the global service object as JSON byte slice

func (*ClusterService) NamespaceServiceName Uses

func (s *ClusterService) NamespaceServiceName() string

NamespaceServiceName returns the namespace and service name

func (*ClusterService) String Uses

func (s *ClusterService) String() string

func (*ClusterService) Unmarshal Uses

func (s *ClusterService) Unmarshal(data []byte) error

Unmarshal parses the JSON byte slice and updates the global service receiver

type PortConfiguration Uses

type PortConfiguration map[string]*loadbalancer.L4Addr

PortConfiguration is the L4 port configuration of a frontend or backend. The map is indexed by the name of the port and the value constains the L4 port and protocol.

func (PortConfiguration) DeepEquals Uses

func (p PortConfiguration) DeepEquals(o PortConfiguration) bool

DeepEquals returns true if both PortConfigurations are identical

Package store imports 5 packages (graph) and is imported by 2 packages. Updated 2020-07-06. Refresh now. Tools for package owners.