flux: github.com/weaveworks/flux Index | Files | Directories

package flux

import "github.com/weaveworks/flux"

Index

Package Files

flux.go

Variables

var (
    ErrInvalidServiceID = errors.New("invalid service ID")

    LegacyServiceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$")
    // The namespace and name components are (apparently
    // non-normatively) defined in
    // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/identifiers.md
    // In practice, more punctuation is used than allowed there;
    // specifically, people use underscores as well as dashes and dots, and in names, colons.
    ResourceIDRegexp            = regexp.MustCompile("^(<cluster>|[a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)/([a-zA-Z0-9_.:-]+)$")
    UnqualifiedResourceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_.:-]+)$")
)

type ResourceID Uses

type ResourceID struct {
    // contains filtered or unexported fields
}

ResourceID is an opaque type which uniquely identifies a resource in an orchestrator.

func MakeResourceID Uses

func MakeResourceID(namespace, kind, name string) ResourceID

MakeResourceID constructs a ResourceID from constituent components.

func MustParseResourceID Uses

func MustParseResourceID(s string) ResourceID

MustParseResourceID constructs a ResourceID from a string representation, panicing if the format is invalid.

func ParseResourceID Uses

func ParseResourceID(s string) (ResourceID, error)

ParseResourceID constructs a ResourceID from a string representation if possible, returning an error value otherwise.

func ParseResourceIDOptionalNamespace Uses

func ParseResourceIDOptionalNamespace(namespace, s string) (ResourceID, error)

ParseResourceIDOptionalNamespace constructs a ResourceID from either a fully qualified string representation, or an unqualified kind/name representation and the supplied namespace.

func (ResourceID) Components Uses

func (id ResourceID) Components() (namespace, kind, name string)

Components returns the constituent components of a ResourceID

func (ResourceID) MarshalJSON Uses

func (id ResourceID) MarshalJSON() ([]byte, error)

MarshalJSON encodes a ResourceID as a JSON string. This is done to maintain backwards compatibility with previous flux versions where the ResourceID is a plain string.

func (ResourceID) MarshalText Uses

func (id ResourceID) MarshalText() (text []byte, err error)

MarshalText encodes a ResourceID as a flat string; this is required because ResourceIDs are sometimes used as map keys.

func (*ResourceID) UnmarshalJSON Uses

func (id *ResourceID) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON decodes a ResourceID from a JSON string. This is done to maintain backwards compatibility with previous flux versions where the ResourceID is a plain string.

func (*ResourceID) UnmarshalText Uses

func (id *ResourceID) UnmarshalText(text []byte) error

MarshalText decodes a ResourceID from a flat string; this is required because ResourceIDs are sometimes used as map keys.

type ResourceIDSet Uses

type ResourceIDSet map[ResourceID]struct{}

func (ResourceIDSet) Add Uses

func (s ResourceIDSet) Add(ids []ResourceID)

func (ResourceIDSet) Contains Uses

func (s ResourceIDSet) Contains(id ResourceID) bool

func (ResourceIDSet) Intersection Uses

func (s ResourceIDSet) Intersection(others ResourceIDSet) ResourceIDSet

func (ResourceIDSet) String Uses

func (s ResourceIDSet) String() string

func (ResourceIDSet) ToSlice Uses

func (s ResourceIDSet) ToSlice() ResourceIDs

func (ResourceIDSet) Without Uses

func (s ResourceIDSet) Without(others ResourceIDSet) ResourceIDSet

type ResourceIDs Uses

type ResourceIDs []ResourceID

func (ResourceIDs) Contains Uses

func (ids ResourceIDs) Contains(id ResourceID) bool

func (ResourceIDs) Intersection Uses

func (ids ResourceIDs) Intersection(others ResourceIDSet) ResourceIDSet

func (ResourceIDs) Len Uses

func (p ResourceIDs) Len() int

func (ResourceIDs) Less Uses

func (p ResourceIDs) Less(i, j int) bool

func (ResourceIDs) Sort Uses

func (p ResourceIDs) Sort()

func (ResourceIDs) Swap Uses

func (p ResourceIDs) Swap(i, j int)

func (ResourceIDs) Without Uses

func (ids ResourceIDs) Without(others ResourceIDSet) (res ResourceIDs)

Directories

PathSynopsis
api
api/v10This package defines the types for Flux API version 10.
api/v11This package defines the types for Flux API version 11.
api/v6
api/v9This package defines the types for Flux API version 9.
checkpoint
cluster
cluster/kubernetesPackage kubernetes provides implementations of `Cluster` and `manifests` that interact with the Kubernetes API (using kubectl or the k8s API client).
cluster/kubernetes/resource
cluster/kubernetes/testfiles
daemon
errors
event
git
git/gittest
gpgPackage gpg has procedures for dealing with GNU Privacy Guard (gpg), in service of signing commits.
gpg/gpgtest
guid
http
http/client
http/daemon
http/httperror
http/websocket
image
integrations/apis/flux.weave.works
integrations/apis/flux.weave.works/v1beta1
integrations/apis/helm.integrations.flux.weave.works
integrations/apis/helm.integrations.flux.weave.works/v1alpha2Package v1 is the v1 version of the API.
integrations/client/clientset/versioned
integrations/client/clientset/versioned/fakeThis package has the automatically generated fake clientset.
integrations/client/clientset/versioned/schemeThis package contains the scheme of the automatically generated clientset.
integrations/client/clientset/versioned/typed/flux.weave.works/v1beta1This package has the automatically generated typed clients.
integrations/client/clientset/versioned/typed/flux.weave.works/v1beta1/fakePackage fake has the automatically generated clients.
integrations/client/clientset/versioned/typed/helm.integrations.flux.weave.works/v1alpha2This package has the automatically generated typed clients.
integrations/client/clientset/versioned/typed/helm.integrations.flux.weave.works/v1alpha2/fakePackage fake has the automatically generated clients.
integrations/client/informers/externalversions
integrations/client/informers/externalversions/flux.weave.works
integrations/client/informers/externalversions/flux.weave.works/v1beta1
integrations/client/informers/externalversions/helm.integrations.flux.weave.works
integrations/client/informers/externalversions/helm.integrations.flux.weave.works/v1alpha2
integrations/client/informers/externalversions/internalinterfaces
integrations/client/listers/flux.weave.works/v1beta1
integrations/client/listers/helm.integrations.flux.weave.works/v1alpha2
integrations/helm
integrations/helm/api
integrations/helm/chartsyncThis package has the algorithm for making sure the Helm releases in the cluster match what are defined in the HelmRelease resources.
integrations/helm/http
integrations/helm/http/daemon
integrations/helm/operator
integrations/helm/release
integrations/helm/statusThis package is for maintaining the link between `HelmRelease` resources and the Helm releases to which they correspond.
job
metrics
policy
registryThis package has types for dealing with image registries (e.g., quay.io, DockerHub, Google Container Registry, ..).
registry/cacheThis package implements an image metadata cache given a backing k-v store.
registry/cache/memcachedThis package implements an image DB cache using memcached.
registry/middleware
registry/mock
release
remote
remote/rpcThis is a `net/rpc`-compatible implementation of a client and server for `flux/api.Server`.
resource
ssh
sync
update

Package flux imports 6 packages (graph) and is imported by 67 packages. Updated 2019-05-26. Refresh now. Tools for package owners.