Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigDataNode

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

    Represents a set of configuration data

    func FromTable

    func FromTable(table map[string]ctypes.ConfigValue) *ConfigDataNode

    func NewNode

    func NewNode() *ConfigDataNode

      Returns a new and empty node.

      func (*ConfigDataNode) AddItem

      func (c *ConfigDataNode) AddItem(k string, v ctypes.ConfigValue)

        Adds an item to the ConfigDataNode.

        func (ConfigDataNode) DeleteItem

        func (c ConfigDataNode) DeleteItem(k string)

          Deletes a field in ConfigDataNode. If the field does not exist Delete is considered a no-op

          func (*ConfigDataNode) GobDecode

          func (c *ConfigDataNode) GobDecode(buf []byte) error

            GobDecode decodes a GOB into a ConfigDataNode

            func (*ConfigDataNode) GobEncode

            func (c *ConfigDataNode) GobEncode() ([]byte, error)

              GobEcode encodes a ConfigDataNode in go binary format

              func (*ConfigDataNode) MarshalJSON

              func (c *ConfigDataNode) MarshalJSON() ([]byte, error)

                MarshalJSON marshals a ConfigDataNode into JSON

                func (ConfigDataNode) Merge

                func (c ConfigDataNode) Merge(n ctree.Node) ctree.Node

                  Merges a ConfigDataNode on top of this one (overwriting items where it occurs).

                  func (*ConfigDataNode) ReverseMerge

                  func (c *ConfigDataNode) ReverseMerge(n ctree.Node) ctree.Node

                    Merges a ConfigDataNode with this one but does not overwrite any conflicting values. Any conflicts are decided by the callers value.

                    func (*ConfigDataNode) Table

                    func (c *ConfigDataNode) Table() map[string]ctypes.ConfigValue

                      Returns the table of configuration items [key(string) / value(core.ConfigValue)].

                      func (*ConfigDataNode) UnmarshalJSON

                      func (c *ConfigDataNode) UnmarshalJSON(data []byte) error

                        UnmarshalJSON unmarshals JSON into a ConfigDataNode

                        type ConfigDataTree

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

                          Allows adding of config data by namespace and retrieving of data from tree at a specific namespace (merging the relevant hiearchy). Uses pkg.ConfigTree.

                          func NewTree

                          func NewTree() *ConfigDataTree

                            Returns a new ConfigDataTree.

                            func (*ConfigDataTree) Add

                            func (c *ConfigDataTree) Add(ns []string, cdn *ConfigDataNode)

                              Adds a ConfigDataNode at the provided namespace.

                              func (*ConfigDataTree) Freeze

                              func (c *ConfigDataTree) Freeze()

                                Freezes the ConfigDataTree from future writes (adds) and triggers compression of tree into read-performant version.

                                func (*ConfigDataTree) Get

                                func (c *ConfigDataTree) Get(ns []string) *ConfigDataNode

                                  Returns a ConfigDataNode that is a merged version of the namespace provided.

                                  func (*ConfigDataTree) GobDecode

                                  func (c *ConfigDataTree) GobDecode(buf []byte) error

                                  func (*ConfigDataTree) GobEncode

                                  func (c *ConfigDataTree) GobEncode() ([]byte, error)

                                  Source Files