//NewProfile returns a new controlprofile func NewProfile(containerPath string, tlp *lxc.TemplateOptions, clt *lxc.CloneOptions, d, s time.Duration, snifer bool) (p *ControlProfile) { p = &ControlProfile{ Path: containerPath, Create: tlp, Clone: clt, Snifers: snifer, RetryMax: 10, Configurations: flux.NewSecureMap(), HookFx: &HookFx{}, Hooks: &api.Hooks{}, Durations: &Durations{ Freeze: d, Stop: s, Retry: time.Duration(1) * time.Second, }, Attach: &lxc.AttachOptions{ ClearEnv: true, }, Checks: &lxc.CheckpointOptions{ Directory: "", Stop: false, Verbose: true, }, Restores: &lxc.RestoreOptions{ Directory: "", Verbose: true, }, } return }
//NewFactory returns a new DirectorFactory func NewFactory(d *Director) *DirectorFactory { return &DirectorFactory{ Director: d, factory: flux.NewSecureMap(), } }
//NewSessionManager allows management of sessions(ambiguous up to you to define that) func NewSessionManager() *SessionManager { return &SessionManager{flux.NewSecureMap()} }