MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / OnStateChange

Method OnStateChange

service/lifecycle.go:74–74  ·  view source on GitHub ↗

endregion region Hook setup OnStateChange adds a function handler to be called on any state change.

(func(s Service, l Lifecycle, state State))

Source from the content-addressed store, hash-verified

72
73 // OnStateChange adds a function handler to be called on any state change.
74 OnStateChange(func(s Service, l Lifecycle, state State)) Lifecycle
75
76 // OnStarting adds a function handler to be called when the service is about to start.
77 OnStarting(func(s Service, l Lifecycle)) Lifecycle

Callers 8

TestOneServiceFunction · 0.95
TestOneServiceCrashFunction · 0.95
AddMethod · 0.65
TestTwoServicesFunction · 0.65

Implementers 1

lifecycleservice/lifecycle_impl.go

Calls

no outgoing calls

Tested by 7

TestOneServiceFunction · 0.76
TestOneServiceCrashFunction · 0.76
TestTwoServicesFunction · 0.52