// MustService returns the context's StorageService  and panics if it does not
// exist and/or cannot be type cast.
186861
func MustService(ctx context.Context) types.StorageService {
	v, _ := Service(ctx)
	return v.(types.StorageService)
}
23568
func (d *DefaultLoader) MustValidate(conf interface{}) {
	if err := d.Validate(conf); err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(2)
	}
}
659105
func (m multiLoader) MustLoad(s interface{}) {
	if err := m.Load(s); err != nil {
		panic(err)
	}
}
902176
func (_m *Balancer) AddService(_a0 *types.Service) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(*types.Service) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
459116
func WithServices(c context.Context, s Services) context.Context {
	return context.WithValue(c, &servicesKey, s)
}
700900
func WithStorageService(
	parent context.Context, service types.StorageService) types.Context {

	var (
		serviceName = strings.ToLower(service.Name())
		driver      = service.Driver()
		driverName  = strings.ToLower(driver.Name())
	)

	parent = newContext(parent, DriverKey, driver, nil, nil)

	// set the service's InstanceID if present
	if iidm, ok := parent.Value(AllInstanceIDsKey).(types.InstanceIDMap); ok {
		if iid, ok := iidm[serviceName]; ok {
			parent = newContext(parent, InstanceIDKey, iid, nil, nil)
		}
	}

	// set the service's LocalDevices if present
	if ldm, ok := parent.Value(AllLocalDevicesKey).(types.LocalDevicesMap); ok {
		if ld, ok := ldm[driverName]; ok {
			parent = newContext(parent, LocalDevicesKey, ld, nil, nil)
		}
	}

	return newContext(parent, ServiceKey, service, nil, nil)
}
300305
func MustAuthToken(ctx context.Context) *types.AuthToken {
	return ctx.Value(AuthTokenKey).(*types.AuthToken)
}
216229
func (ctx *Context) MustAny(any interface{}) interface{} {
	val, err := ctx.Any(any)
	if err != nil {
		panic(err)
	}
	return val
}
1241841
func MustExecContext(ctx context.Context, e ExecerContext, query string, args ...interface{}) sql.Result {
	res, err := e.ExecContext(ctx, query, args...)
	if err != nil {
		panic(err)
	}
	return res
}
1122717
func MustParse(s string) time.Time {
	d, err := Parse(s)
	if err != nil {
		panic(err)
	}
	return d
}
686179
func (c *AvailableConditionController) addService(obj interface{}) {
	for _, apiService := range c.getAPIServicesFor(obj.(*v1.Service)) {
		c.enqueue(apiService)
	}
}
355590
func (d *Decoder) MustDecode(v interface{}) {
	if d.err != nil {
		panic(d.err)
	}
	d.mustDecode(v)
}
130274
func mustBe(v kinder, expected reflect.Kind) {
	if k := v.Kind(); k != expected {
		panic(&reflect.ValueError{Method: methodName(), Kind: k})
	}
}
458500
func hasServerContext(ctx context.Context) bool {
	// prevents panic in case of nil context
	if ctx == nil {
		return false
	}
	sa, ok := ctx.Value(ServerContextKey).(bool)
	// should never happen
	if !ok {
		return false
	}
	return sa
}
868752
func (s ConstraintStr) MustParse() Constraints {
	ret, err := s.Parse()
	if err != nil {
		panic(err)
	}
	return ret
}
4703
func MustAsset(name string) []byte {
	a, err := Asset(name)
	if (err != nil) {
		panic("asset: Asset(" + name + "): " + err.Error())
	}

	return a
}
1043104
func (p *Psyringe) MustInject(targets ...interface{}) {
	if err := p.Inject(targets...); err != nil {
		panic(err)
	}
}