Documentation ¶
Index ¶
- func CreateEnvironment(environmentType, folder, id string, ...) (pufferpanel.Environment, error)
- func CreateFunctions(env pufferpanel.Environment) []cel.EnvOption
- func Delete(id string) (err error)
- func GetSupportedEnvironments() []string
- func InitService()
- func LoadFromFolder()
- func Reload(id string) (err error)
- func Save(id string) (err error)
- func SendStatsForServers()
- func ShutdownService()
- func StartViaService(p *Server)
- type FileData
- type OperationProcess
- type OperationTask
- type Scheduler
- func (s *Scheduler) AddTask(id string, task pufferpanel.Task) error
- func (s *Scheduler) GetTasks() map[string]pufferpanel.Task
- func (s *Scheduler) Init() error
- func (s *Scheduler) IsRunning() bool
- func (s *Scheduler) IsTaskRunning(id string) bool
- func (s *Scheduler) RemoveTask(id string) error
- func (s *Scheduler) RunTask(id string) error
- func (s *Scheduler) Save() error
- func (s *Scheduler) Start()
- func (s *Scheduler) Stop()
- type Server
- func (p *Server) ArchiveItems(files []string, destination string) error
- func (p *Server) Create() (err error)
- func (p *Server) DataToMap() map[string]interface{}
- func (p *Server) Destroy() (err error)
- func (p *Server) EditData(data map[string]interface{}) (err error)
- func (p *Server) Execute(command string) (err error)
- func (p *Server) Extract(source, destination string) error
- func (p *Server) GetData() map[string]pufferpanel.Variable
- func (p *Server) GetEnvironment() pufferpanel.Environment
- func (p *Server) GetFileServer() pufferpanel.FileServer
- func (p *Server) GetItem(name string) (*FileData, error)
- func (p *Server) GetNetwork() string
- func (p *Server) Id() string
- func (p *Server) Install() error
- func (p *Server) IsAutoStart() (isAutoStart bool)
- func (p *Server) IsRunning() (bool, error)
- func (p *Server) Kill() (err error)
- func (p *Server) Log(l *log.Logger, format string, obj ...interface{})
- func (p *Server) RunCondition(condition interface{}, extraData map[string]interface{}) (bool, error)
- func (p *Server) Save() (err error)
- func (p *Server) SetAutoStart(isAutoStart bool) (err error)
- func (p *Server) SetEnvironment(environment pufferpanel.Environment) (err error)
- func (p *Server) Start() error
- func (p *Server) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEnvironment ¶
func CreateFunctions ¶
func GetSupportedEnvironments ¶
func GetSupportedEnvironments() []string
func InitService ¶
func InitService()
func LoadFromFolder ¶
func LoadFromFolder()
func SendStatsForServers ¶
func SendStatsForServers()
func ShutdownService ¶
func ShutdownService()
func StartViaService ¶
func StartViaService(p *Server)
Types ¶
type OperationProcess ¶
type OperationProcess []*OperationTask
func GenerateProcess ¶
func GenerateProcess(directions []pufferpanel.ConditionalMetadataType, environment pufferpanel.Environment, dataMapping map[string]interface{}, env map[string]string) (OperationProcess, error)
func (*OperationProcess) Run ¶
func (p *OperationProcess) Run(server *Server) error
type OperationTask ¶
type OperationTask struct { Operation pufferpanel.CreateOperation Condition interface{} Type string }
type Scheduler ¶
type Scheduler struct { Tasks map[string]pufferpanel.Task `json:"tasks"` Timezone string `json:"timezone,omitempty"` ConcurrentLimit int `json:"concurrentLimit"` LimitMode string `json:"limitMode"` // contains filtered or unexported fields }
func LoadScheduler ¶
LoadScheduler Loads the scheduler from the serverid.cron file, or defaults This file is a JSON file, but it hooks into everything
func NewDefaultScheduler ¶
func (*Scheduler) IsTaskRunning ¶
func (*Scheduler) RemoveTask ¶
type Server ¶
type Server struct { pufferpanel.Server CrashCounter int `json:"-"` RunningEnvironment pufferpanel.Environment `json:"-"` Scheduler *Scheduler `json:"-"` // contains filtered or unexported fields }
func CreateProgram ¶
func CreateProgram() *Server
func GetFromCache ¶
func (*Server) ArchiveItems ¶
func (*Server) Create ¶
Create Creates any files needed for the program. This includes creating the environment.
func (*Server) Destroy ¶
Destroy Destroys the server. This will delete the server, environment, and any files related to it.
func (*Server) GetEnvironment ¶
func (p *Server) GetEnvironment() pufferpanel.Environment
func (*Server) GetFileServer ¶
func (p *Server) GetFileServer() pufferpanel.FileServer
func (*Server) GetNetwork ¶
func (*Server) IsAutoStart ¶
func (*Server) RunCondition ¶
func (*Server) SetAutoStart ¶
func (*Server) SetEnvironment ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.