github.com/aergoio/aergo@v1.3.1/pkg/component/status.go (about)

     1  /**
     2   *  @file
     3   *  @copyright defined in aergo/LICENSE.txt
     4   */
     5  
     6  package component
     7  
     8  // StatusToString returns a string representation of a component's status
     9  func StatusToString(status Status) string {
    10  	switch status {
    11  	case StartedStatus:
    12  		return "started"
    13  	case StoppingStatus:
    14  		return "stopping"
    15  	case StoppedStatus:
    16  		return "stopped"
    17  	case RestartingStatus:
    18  		return "restarting"
    19  	default:
    20  		return "unknown"
    21  	}
    22  }