Documentation
¶
Index ¶
- Variables
- func Configure(providedConfig ConfigOptions)
- func Decode(bytes []byte) (map[string]interface{}, error)
- func Delete(nodes []string, files []string) map[string]interface{}
- func Initialize(nodeListFileContent []byte) bool
- func IoLogic(fileInputChan chan map[string]interface{}, action string, node Node, ...)
- func IsClusterReachable(clusterLocation string) bool
- func IsDir(path string, createDir bool) bool
- func IsLocalNode(node Node) bool
- func Manage(action string, nodes []string, providedFiles interface{}, content interface{}) map[string]interface{}
- func MessageLogger(syslogType syslog.Priority, message string)
- func ObjectMerger(currentContent, newContent map[string]interface{}) map[string]interface{}
- func Read(nodes []string, files []string) map[string]interface{}
- func Request(fileInputChan chan map[string]interface{}, action string, node Node, ...)
- func Update(nodes []string, files []string, content interface{}) map[string]interface{}
- func Write(nodes []string, files []string, content interface{}) map[string]interface{}
- type ConfigOptions
- type Node
- type NodeGroup
Constants ¶
This section is empty.
Variables ¶
var NodeList map[string]interface{}
NodeList is a List of Nodes or Node Grtoups
Functions ¶
func Configure ¶
func Configure(providedConfig ConfigOptions)
Configure is used to configure the metis-pkg
func Decode ¶
Decode is responsible for taking []byte, decoding, and returning a map[string]interface{} and/or decode error
func Initialize ¶
Initialize will initialize the metis with the contents of a NodeList
func IoLogic ¶
func IoLogic(fileInputChan chan map[string]interface{}, action string, node Node, file string, content interface{})
IoLogic is responsible for handling local file IO, triggered via Manage()
func IsClusterReachable ¶
IsClusterReachable will ping the Cluster to confirm if we can connect
func IsLocalNode ¶
IsLocalNode checks if the provided Node is local or remote
func Manage ¶
func Manage(action string, nodes []string, providedFiles interface{}, content interface{}) map[string]interface{}
Manage handles channeling, local / remote IO differentiation, etc.
func MessageLogger ¶
MessageLogger log a message to system log
func ObjectMerger ¶
ObjectMerger will merge two objects
func Request ¶
func Request(fileInputChan chan map[string]interface{}, action string, node Node, files []string, content interface{})
Request handles API requests to another remote Metis cluster.
Types ¶
type ConfigOptions ¶
type ConfigOptions struct {
DataRootDirectory string // Directory where data is stored
}
ConfigOptions is a struct of available configuration options for metis
var Config ConfigOptions
Config is the configuration of metis
type Node ¶
type Node struct {
Folder, Address, ExternalNodes string
}
Node is a struct with information on a Metis Node
func ConvertToNode ¶
ConvertToNode will attempt to convert interface{} to Node