Files
crawlab/core/interfaces/model_node.go
2024-06-14 15:42:50 +08:00

23 lines
515 B
Go

package interfaces
import "time"
type Node interface {
ModelWithNameDescription
GetKey() (key string)
GetIsMaster() (ok bool)
GetActive() (active bool)
SetActive(active bool)
SetActiveTs(activeTs time.Time)
GetStatus() (status string)
SetStatus(status string)
GetEnabled() (enabled bool)
SetEnabled(enabled bool)
GetAvailableRunners() (runners int)
SetAvailableRunners(runners int)
GetMaxRunners() (runners int)
SetMaxRunners(runners int)
IncrementAvailableRunners()
DecrementAvailableRunners()
}