...

Source file src/github.com/redhat-developer/odo/pkg/apiserver-impl/devstate/events.go

Documentation: github.com/redhat-developer/odo/pkg/apiserver-impl/devstate

     1  package devstate
     2  
     3  import (
     4  	. "github.com/redhat-developer/odo/pkg/apiserver-gen/go"
     5  )
     6  
     7  func (o *DevfileState) UpdateEvents(event string, commands []string) (DevfileContent, error) {
     8  	switch event {
     9  	case "postStart":
    10  		o.Devfile.Data.UpdateEvents(commands, nil, nil, nil)
    11  	case "postStop":
    12  		o.Devfile.Data.UpdateEvents(nil, commands, nil, nil)
    13  	case "preStart":
    14  		o.Devfile.Data.UpdateEvents(nil, nil, commands, nil)
    15  	case "preStop":
    16  		o.Devfile.Data.UpdateEvents(nil, nil, nil, commands)
    17  	}
    18  	return o.GetContent()
    19  }
    20  

View as plain text