Documentation ¶
Index ¶
- Variables
- func Factory() server.Session
- type ConfigExpander
- type Extension
- type Session
- func (s *Session) Close()
- func (s *Session) ExpandConfig(in interface{}) interface{}
- func (s *Session) ExpandRef(in interface{}) interface{}
- func (s *Session) GetArgs() []string
- func (s *Session) GetCfg(hostId, path string) interface{}
- func (s *Session) GetConfig() interface{}
- func (s *Session) GetHost(hostID string) (*server.Host, error)
- func (s *Session) GetID() string
- func (s *Session) GetInv() server.InternalInventory
- func (s *Session) GetLogger(host *server.Host) server.Logger
- func (s *Session) GetModules() server.ModuleMgr
- func (s *Session) SetArgs(args []string)
- func (s *Session) SetConfig(i interface{})
- func (s *Session) SetInv(i server.InternalInventory)
- func (s *Session) SetLog(l server.Logging)
- func (s *Session) SetLogStdout(z bool)
- func (s *Session) SetModules(m server.ModuleMgr)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Extensions = map[string]func(server.Session) Extension{}
)
Registered extensions
Functions ¶
Types ¶
type ConfigExpander ¶
type ConfigExpander interface {
ExpandConfig(in interface{}) interface{}
}
ConfigExpander is an extension that can expand config 'ref' objects
type Session ¶
type Session struct { sync.RWMutex ID string Inv server.InternalInventory Modules server.ModuleMgr Log server.Logging LogStdout bool Config interface{} Extensions map[string]Extension Args []string }
Session keeps everything related to one running session
func (*Session) ExpandConfig ¶
func (s *Session) ExpandConfig(in interface{}) interface{}
func (*Session) ExpandRef ¶
func (s *Session) ExpandRef(in interface{}) interface{}
ExpandRef expands the configuration value using an extension if there is a mathching one
func (*Session) GetConfig ¶
func (s *Session) GetConfig() interface{}
GetConfig returns the configuration
func (*Session) GetInv ¶
func (s *Session) GetInv() server.InternalInventory
GetInv returns the inventory
func (*Session) GetModules ¶
GetModules returns the module mgr
func (*Session) SetConfig ¶
func (s *Session) SetConfig(i interface{})
SetConfig sets the configuration
func (*Session) SetInv ¶
func (s *Session) SetInv(i server.InternalInventory)
SetInv sets the inventory
func (*Session) SetLogStdout ¶
SetLogStdout sets whether to log to stdout
func (*Session) SetModules ¶
SetModules returns the module mgr
Click to show internal directories.
Click to hide internal directories.