MCPcopy
hub / github.com/grafana/dskit / mustSwitchState

Method mustSwitchState

services/basic_service.go:147–151  ·  view source on GitHub ↗
(from, to State, stateFn func())

Source from the content-addressed store, hash-verified

145}
146
147func (b *BasicService) mustSwitchState(from, to State, stateFn func()) {
148 if ok, _ := b.switchState(from, to, stateFn); !ok {
149 panic("switchState failed")
150 }
151}
152
153// This is the "main" method, that does most of the work of service.
154// Service is in Starting state when this method runs.

Callers 1

mainMethod · 0.95

Calls 1

switchStateMethod · 0.95

Tested by

no test coverage detected