github.com/dustinrc/deis@v1.10.1-0.20150917223407-0894a5fb979e/mesos/pkg/boot/extpoints/interfaces.go (about)

     1  package extpoints
     2  
     3  import (
     4  	"github.com/deis/deis/mesos/pkg/types"
     5  )
     6  
     7  // BootComponent interface that defines the steps
     8  // required to initialize a component
     9  type BootComponent interface {
    10  	// EtcdDefaults required initial values in etcd
    11  	EtcdDefaults() map[string]string
    12  
    13  	// MkdirsEtcd required directories in etcd
    14  	MkdirsEtcd() []string
    15  
    16  	// PreBoot custom pre-boot task (custom go code)
    17  	PreBoot(currentBoot *types.CurrentBoot)
    18  
    19  	// PreBootScripts scripts to execute before the component starts
    20  	PreBootScripts(currentBoot *types.CurrentBoot) []*types.Script
    21  
    22  	// UseConfd is required the use of confd?
    23  	UseConfd() (bool, bool)
    24  
    25  	// BootDaemons required commands to start the component
    26  	BootDaemons(currentBoot *types.CurrentBoot) []*types.ServiceDaemon
    27  
    28  	// WaitForPorts ports that must be open to indicate that the component is running
    29  	WaitForPorts() []int
    30  
    31  	// PostBootScripts scripts to execute after the component starts
    32  	PostBootScripts(currentBoot *types.CurrentBoot) []*types.Script
    33  
    34  	// PostBoot custom post-boot task (custom go code)
    35  	PostBoot(currentBoot *types.CurrentBoot)
    36  
    37  	// ScheduleTasks tasks that must run during the lifecycle of the component
    38  	ScheduleTasks(currentBoot *types.CurrentBoot) []*types.Cron
    39  
    40  	// PreShutdownScripts scripts to execute before the component execution ends
    41  	PreShutdownScripts(currentBoot *types.CurrentBoot) []*types.Script
    42  }