node

package
v0.5.2-pre1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2014 License: Apache-2.0 Imports: 8 Imported by: 30

Documentation

Overview

Package node implements nodes. They do chef-client runs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetList

func GetList() []string

Get a list of the nodes on this server.

Types

type Node

type Node struct {
	Name            string                 `json:"name"`
	ChefEnvironment string                 `json:"chef_environment"`
	RunList         []string               `json:"run_list"`
	JsonClass       string                 `json:"json_class"`
	ChefType        string                 `json:"chef_type"`
	Automatic       map[string]interface{} `json:"automatic"`
	Normal          map[string]interface{} `json:"normal"`
	Default         map[string]interface{} `json:"default"`
	Override        map[string]interface{} `json:"override"`
}

func AllNodes added in v0.5.2

func AllNodes() []*Node

Return all the nodes on the server

func Get

func Get(node_name string) (*Node, error)

func GetFromEnv added in v0.5.0

func GetFromEnv(env_name string) ([]*Node, error)

func New

func New(name string) (*Node, util.Gerror)

func NewFromJson

func NewFromJson(json_node map[string]interface{}) (*Node, util.Gerror)

Create a new node from the uploaded JSON.

func (*Node) Delete

func (n *Node) Delete() error

func (*Node) DocId

func (n *Node) DocId() string

func (*Node) Flatten

func (n *Node) Flatten() []string

func (*Node) GetName

func (n *Node) GetName() string

func (*Node) Index

func (n *Node) Index() string

func (*Node) Save

func (n *Node) Save() error

func (*Node) URLType

func (n *Node) URLType() string

func (*Node) UpdateFromJson

func (n *Node) UpdateFromJson(json_node map[string]interface{}) util.Gerror

Update an existing node with the uploaded JSON.

Jump to

Keyboard shortcuts

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