istio: istio.io/istio/pkg/config Index | Files | Directories

package config

import "istio.io/istio/pkg/config"

Package config is a common, top-level folder for aggregating Istio-wide config related libraries and utilities. More details can be found here: https://docs.google.com/document/d/1atY5vDHy5sXJP7qIaFQS3ixQZvOxUciPgULH5qTPX_8/

Index

Package Files

doc.go model.go

func ApplyJSON Uses

func ApplyJSON(s Spec, js string) error

func ApplyJSONStrict Uses

func ApplyJSONStrict(s Spec, js string) error

func ApplyYAML Uses

func ApplyYAML(s Spec, yml string) error

func Key Uses

func Key(typ, name, namespace string) string

Key function for the configuration objects

func ToJSON Uses

func ToJSON(s Spec) ([]byte, error)

func ToMap Uses

func ToMap(s Spec) (map[string]interface{}, error)

func ToProtoGogo Uses

func ToProtoGogo(s Spec) (*gogotypes.Any, error)

type Config Uses

type Config struct {
    Meta

    // Spec holds the configuration object as a gogo protobuf message
    Spec Spec

    // Status holds long-running status.
    Status Status
}

Config is a configuration unit consisting of the type of configuration, the key identifier that is unique per type, and the content represented as a protobuf message.

func (Config) DeepCopy Uses

func (c Config) DeepCopy() Config

type GroupVersionKind Uses

type GroupVersionKind struct {
    Group   string `json:"group"`
    Version string `json:"version"`
    Kind    string `json:"kind"`
}

func (GroupVersionKind) String Uses

func (g GroupVersionKind) String() string

type Meta Uses

type Meta struct {
    // GroupVersionKind is a short configuration name that matches the content message type
    // (e.g. "route-rule")
    GroupVersionKind GroupVersionKind `json:"type,omitempty"`

    // Name is a unique immutable identifier in a namespace
    Name string `json:"name,omitempty"`

    // Namespace defines the space for names (optional for some types),
    // applications may choose to use namespaces for a variety of purposes
    // (security domains, fault domains, organizational domains)
    Namespace string `json:"namespace,omitempty"`

    // Domain defines the suffix of the fully qualified name past the namespace.
    // Domain is not a part of the unique key unlike name and namespace.
    Domain string `json:"domain,omitempty"`

    // Map of string keys and values that can be used to organize and categorize
    // (scope and select) objects.
    Labels map[string]string `json:"labels,omitempty"`

    // Annotations is an unstructured key value map stored with a resource that may be
    // set by external tools to store and retrieve arbitrary metadata. They are not
    // queryable and should be preserved when modifying objects.
    Annotations map[string]string `json:"annotations,omitempty"`

    // ResourceVersion is an opaque identifier for tracking updates to the config registry.
    // The implementation may use a change index or a commit log for the revision.
    // The config client should not make any assumptions about revisions and rely only on
    // exact equality to implement optimistic concurrency of read-write operations.
    //
    // The lifetime of an object of a particular revision depends on the underlying data store.
    // The data store may compactify old revisions in the interest of storage optimization.
    //
    // An empty revision carries a special meaning that the associated object has
    // not been stored and assigned a revision.
    ResourceVersion string `json:"resourceVersion,omitempty"`

    // CreationTimestamp records the creation time
    CreationTimestamp time.Time `json:"creationTimestamp,omitempty"`
}

Meta is metadata attached to each configuration unit. The revision is optional, and if provided, identifies the last update operation on the object.

func (*Meta) Key Uses

func (meta *Meta) Key() string

Key is the unique identifier for a configuration object TODO: this is *not* unique - needs the version and group

type Spec Uses

type Spec interface{}

Spec defines the spec for the config. In order to use below helper methods, this must be one of: * golang/protobuf Message * gogo/protobuf Message * Able to marshal/unmarshal using json

func DeepCopy Uses

func DeepCopy(s Spec) Spec

type Status Uses

type Status interface{}

Directories

PathSynopsis
constants
event
gateway
host
kube
labels
mesh
protocol
resourcePackage resource contains core abstract types for representing configuration resources.
schemaCode generated for package schema by go-bindata DO NOT EDIT.
schema/ast
schema/codegen
schema/collection
schema/collections
schema/fuzz
schema/gvk
schema/resource
schema/snapshots
security
validation
visibility
xdsgo:generate sh -c "echo '// Copyright Istio Authors' > filter_types.gen.go" go:generate sh -c "echo '//' >> filter_types.gen.go" go:generate sh -c "echo '// Licensed under the Apache License, Version 2.0 (the \"License\");' >> filter_types.gen.go" go:generate sh -c "echo '// you may not use this file except in compliance with the License.' >> filter_types.gen.go" go:generate sh -c "echo '// You ...

Package config imports 15 packages (graph) and is imported by 23 packages. Updated 2020-09-27. Refresh now. Tools for package owners.