Documentation ¶
Index ¶
- Constants
- Variables
- func CheckoutTokenByJobId(jobid string) (token string, err error)
- func CheckoutWorkunitRemote() (workunit *core.Workunit, err error)
- func CleanDisk() (err error)
- func ComposeProfile() (profile *core.Client, err error)
- func CreateContainer(create_args []string) (container_id string, err error)
- func DiscardWorkunit(id core.Workunit_Unique_Identifier) (err error)
- func DockerizeName(input string) string
- func FetchPrivateEnvByWorkId(workid string) (envs map[string]string, err error)
- func InitWorkers()
- func InspectImage(client *docker.Client, dockerimage_id string) (image *docker.Image, err error)
- func KillContainer(container_id string) (err error)
- func ParseWorkunitArgs(work *core.Workunit) (err error)
- func ReRegisterWithSelf(host string) (err error)
- func RegisterWithAuth(host string, pclient *core.Client) (err error)
- func RegisterWithProfile(host string, profile *core.Client) (client *core.Client, err error)
- func RemoveContainer(container_id string) (err error)
- func RemoveOldAWEContainers(client *docker.Client, container_name string) (err error)
- func RestartClient() (err error)
- func RunCommand(name string, arg ...string) (stdo []byte, stde []byte, err error)
- func RunContainer(run_args []string) (container_id string, err error)
- func RunWorkunit(workunit *core.Workunit) (pstats *core.WorkPerf, err error)
- func RunWorkunitDirect(workunit *core.Workunit) (pstats *core.WorkPerf, stderr_exists bool, err error)
- func RunWorkunitDocker(workunit *core.Workunit) (pstats *core.WorkPerf, err error)
- func SendHeartBeat() (err error)
- func SetEnv(workunit *core.Workunit) (envkeys []string, err error)
- func Set_Metadata(profile *core.Client)
- func SplitDockerimageName(Dockerimage string) (repository string, tag string, err error)
- func StartClientWorkers()
- func StartContainer(container_id string, args string) (err error)
- func StartProxyWorkers()
- func StopClient() (err error)
- func SubmitWorkProxy(work *core.Workunit) (err error)
- func TagImage(client *docker.Client, dockerimage_id string, tag_opts docker.TagImageOptions) (err error)
- func UnSetEnv(envkeys []string)
- func WaitContainer(container_id string) (status int, err error)
- type ClientResponse
- type DockerImageAttributes
- type DockerShockNode
- type DockerShockNodeArray
- type HeartbeatResponse
- type Mediumwork
- type Openstack_Metadata
- type Openstack_Metadata_meta
- type Shock_Dockerimage_attributes
- type TokenResponse
- type WaitContainerResult
- type WorkMap
- func (this *WorkMap) Delete(id core.Workunit_Unique_Identifier) (err error)
- func (this *WorkMap) Get(id core.Workunit_Unique_Identifier) (value int, ok bool, err error)
- func (this *WorkMap) GetKeys() (value []core.Workunit_Unique_Identifier, err error)
- func (this *WorkMap) Set(id core.Workunit_Unique_Identifier, value int, name string) (err error)
- type WorkResponse
Constants ¶
View Source
const ( ID_HEARTBEATER = 0 ID_WORKSTEALER = 1 ID_DATADOWNLOADER = 2 ID_WORKER = 3 ID_DELIVERER = 4 ID_REDISTRIBUTOR = 5 ID_DISCARDED = 6 // flag acts as a message )
Variables ¶
View Source
var ( FromStealer chan *core.Workunit // workStealer -> dataMover //workmap map[string]int //workunit map [work_id]stage_id} Client_mode string )
Functions ¶
func CheckoutTokenByJobId ¶
func CheckoutWorkunitRemote ¶
func ComposeProfile ¶
invoked only once on start of awe-worker
func CreateContainer ¶ added in v0.9.13
func DiscardWorkunit ¶
func DiscardWorkunit(id core.Workunit_Unique_Identifier) (err error)
func DockerizeName ¶ added in v0.9.33
func FetchPrivateEnvByWorkId ¶ added in v0.9.3
func InitWorkers ¶
func InitWorkers()
func InspectImage ¶ added in v0.9.13
func KillContainer ¶ added in v0.9.13
func ParseWorkunitArgs ¶
parse workunit, fetch input data, compose command arguments
func ReRegisterWithSelf ¶
func RegisterWithAuth ¶
invoked on start of AWE worker AND on ReRegisterWithSelf
func RegisterWithProfile ¶
not used, deprecated ?
func RemoveContainer ¶ added in v0.9.13
func RemoveOldAWEContainers ¶ added in v0.9.3
func RestartClient ¶
func RestartClient() (err error)
func RunCommand ¶ added in v0.9.13
execute command, wait, and return stdout and stderr ; do not use for large outputs ! it returns both stdout and stderr
func RunContainer ¶ added in v0.9.13
** not tested **
func RunWorkunitDirect ¶
func RunWorkunitDocker ¶
func SendHeartBeat ¶
func SendHeartBeat() (err error)
client sends heartbeat to server to maintain active status and re-register when needed
func Set_Metadata ¶ added in v0.9.33
func SplitDockerimageName ¶ added in v0.9.33
func StartClientWorkers ¶
func StartClientWorkers()
func StartContainer ¶ added in v0.9.13
func StartProxyWorkers ¶
func StartProxyWorkers()
func StopClient ¶
func StopClient() (err error)
func SubmitWorkProxy ¶
func WaitContainer ¶ added in v0.9.13
Types ¶
type ClientResponse ¶
type DockerImageAttributes ¶ added in v0.9.13
type DockerShockNode ¶ added in v0.9.13
type DockerShockNode struct { shock.ShockNode Version []int Attributes DockerImageAttributes }
type DockerShockNodeArray ¶ added in v0.9.13
type DockerShockNodeArray []DockerShockNode
func (DockerShockNodeArray) Len ¶ added in v0.9.13
func (a DockerShockNodeArray) Len() int
func (DockerShockNodeArray) Less ¶ added in v0.9.13
func (a DockerShockNodeArray) Less(i, j int) bool
func (DockerShockNodeArray) Swap ¶ added in v0.9.13
func (a DockerShockNodeArray) Swap(i, j int)
type HeartbeatResponse ¶
type HeartbeatResponse struct { Code int `bson:"status" json:"status"` Data core.HeartbeatInstructions `bson:"data" json:"data"` Errs []string `bson:"error" json:"error"` }
type Mediumwork ¶ added in v0.9.48
type Openstack_Metadata ¶ added in v0.9.45
type Openstack_Metadata struct { Random_seed string `bson:"random_seed" json:"random_seed"` Uuid string `bson:"uuid" json:"uuid"` Availability_zone string `bson:"availability_zone" json:"availability_zone"` Hostname string `bson:"hostname" json:"hostname"` Project_id string `bson:"project_id" json:"project_id"` Meta *Openstack_Metadata_meta `bson:"meta" json:"meta"` }
curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | jq '.' documentation: https://docs.openstack.org/admin-guide/compute-networking-nova.html TODO use this!
type Openstack_Metadata_meta ¶ added in v0.9.45
type Shock_Dockerimage_attributes ¶ added in v0.9.4
type Shock_Dockerimage_attributes struct { Id string `bson:"id" json:"id"` // this is docker image id, not Shock id Name string `bson:"name" json:"name"` // docker image name Type string `bson:"type" json:"type"` // should be "dockerimage" BaseImageId string `bson:"base_image_id" json:"base_image_id"` // could used to reference parent image }
type TokenResponse ¶
type WaitContainerResult ¶ added in v0.9.33
type WorkMap ¶ added in v0.9.33
func NewWorkMap ¶ added in v0.9.33
func NewWorkMap() *WorkMap
func (*WorkMap) Delete ¶ added in v0.9.33
func (this *WorkMap) Delete(id core.Workunit_Unique_Identifier) (err error)
type WorkResponse ¶
type WorkResponse struct { core.BaseResponse `bson:",inline" json:",inline" mapstructure:",squash"` Data *core.Workunit `bson:"data" json:"data" mapstructure:"data"` }
Click to show internal directories.
Click to hide internal directories.