Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Microservice ¶
type Microservice interface { Start(api api.BitsharesAPI) Stop() SignalHandler(s os.Signal) }
Microservice interface represents a basic contract for every service that wants to perform in OTN infrastructure
type Starter ¶
type Starter struct {
// contains filtered or unexported fields
}
Starter deals with OTN infrastructure
func NewStarter ¶
func NewStarter(service Microservice, cfg *StarterConfig) *Starter
NewStarter creates properly initialized Starter object
type StarterConfig ¶
type StarterConfig struct { InstanceLock string `json:"instance_lock"` TrustedNode string `json:"trusted_node"` Username string `json:"username"` Password string `json:"password"` }
StarterConfig specifies all necessary data for proper OTN API init
type StarterEvent ¶
type StarterEvent int
StarterEvent shows OTN infrastructure event type
const ( StarterEventExit StarterEvent = iota StarterEventAPIConnected StarterEventAPIDisconnected StarterEventLocked StarterEventUnlocked )
Possible events from OTN infrastructure
Click to show internal directories.
Click to hide internal directories.