// NewRemotelyControlledSampler creates a sampler that periodically pulls
// the sampling strategy from an HTTP sampling server (e.g. jaeger-agent).
493256
func NewRemotelyControlledSampler(
	serviceName string,
	opts ...SamplerOption,
) *RemotelyControlledSampler {
	options := applySamplerOptions(opts...)
	sampler := &RemotelyControlledSampler{
		samplerOptions: options,
		serviceName:    serviceName,
		manager:        &httpSamplingManager{serverURL: options.samplingServerURL},
		doneChan:       make(chan *sync.WaitGroup),
	}
	go sampler.pollController()
	return sampler
}
139656
func (r *Repository) CreateRemoteAnonymous(c *config.RemoteConfig) (*Remote, error) {
	if err := c.Validate(); err != nil {
		return nil, err
	}

	if c.Name != "anonymous" {
		return nil, ErrAnonymousRemoteName
	}

	remote := newRemote(r.Storer, c)

	return remote, nil
}
251405
func (m *MockProcessManager) KillRemoteEnforcer(contextID string, force bool) error {
	ret := m.ctrl.Call(m, "KillRemoteEnforcer", contextID, force)
	ret0, _ := ret[0].(error)
	return ret0
}
870500
func NewRemoteRelationsAPI(
	st RemoteRelationsState,
	controllerCfgAPI *common.ControllerConfigAPI,
	resources facade.Resources,
	authorizer facade.Authorizer,
) (*RemoteRelationsAPI, error) {
	if !authorizer.AuthController() {
		return nil, common.ErrPerm
	}
	return &RemoteRelationsAPI{
		st:                  st,
		ControllerConfigAPI: controllerCfgAPI,
		resources:           resources,
		authorizer:          authorizer,
	}, nil
}
372775
func (sws SwaggerService) addModelFromSampleTo(operation *Operation, isResponse bool, sample interface{}, models *ModelList) {
	mb := modelBuilder{Models: models, Config: &sws.config}
	if isResponse {
		sampleType, items := asDataType(sample, &sws.config)
		operation.Type = sampleType
		operation.Items = items
	}
	mb.addModelFrom(sample)
}
1159815
func NewRemoteClient(transport transport.Transport) (*RemoteClient, error) {
	return &RemoteClient{
		transp:    transport,
		connected: make(chan struct{}, 1),
	}, nil
}
923400
func NewMockInstanceMutaterAPI(ctrl *gomock.Controller) *MockInstanceMutaterAPI {
	mock := &MockInstanceMutaterAPI{ctrl: ctrl}
	mock.recorder = &MockInstanceMutaterAPIMockRecorder{mock}
	return mock
}
331554
func WithSampler(sampler Sampler) TracerOption {
	return func(opts *TracerOptions) error {
		opts.shouldSample = sampler
		return nil
	}
}
231147
func NewRcChannelsOverride(CHAN1_RAW uint16, CHAN2_RAW uint16, CHAN3_RAW uint16, CHAN4_RAW uint16, CHAN5_RAW uint16, CHAN6_RAW uint16, CHAN7_RAW uint16, CHAN8_RAW uint16, TARGET_SYSTEM uint8, TARGET_COMPONENT uint8) *RcChannelsOverride {
	m := RcChannelsOverride{}
	m.CHAN1_RAW = CHAN1_RAW
	m.CHAN2_RAW = CHAN2_RAW
	m.CHAN3_RAW = CHAN3_RAW
	m.CHAN4_RAW = CHAN4_RAW
	m.CHAN5_RAW = CHAN5_RAW
	m.CHAN6_RAW = CHAN6_RAW
	m.CHAN7_RAW = CHAN7_RAW
	m.CHAN8_RAW = CHAN8_RAW
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	return &m
}
367451
func newCookieProtector() (cookieProtector, error) {
	secret := make([]byte, cookieSecretSize)
	if _, err := rand.Read(secret); err != nil {
		return nil, err
	}
	return &cookieProtectorImpl{secret: secret}, nil
}
461084
func (s *H265Settings) SetSampleAdaptiveOffsetFilterMode(v string) *H265Settings {
	s.SampleAdaptiveOffsetFilterMode = &v
	return s
}
1148580
func newSampleController(context *opkit.Context, sampleClientset sampleclient.MyprojectV1alpha1Interface) *SampleController {
	return &SampleController{
		context:         context,
		sampleClientset: sampleClientset,
	}
}
1364822
func (m *MockProcessManager) LaunchRemoteEnforcer(contextID string, refPid int, refNsPath, arg, statssecret, procMountPoint string) (bool, error) {
	ret := m.ctrl.Call(m, "LaunchRemoteEnforcer", contextID, refPid, refNsPath, arg, statssecret, procMountPoint)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
1079095
func UnaryInterceptor(i UnaryServerInterceptor) ServerOption {
	return newFuncServerOption(func(o *serverOptions) {
		if o.unaryInt != nil {
			panic("The unary server interceptor was already set and may not be reset.")
		}
		o.unaryInt = i
	})
}
409291
func NewControl(numOutputs int) *Ugen {
	outputs := make([]Output, numOutputs)
	o := Output(1)
	for i := 0; i < numOutputs; i++ {
		outputs[i] = o
	}
	return &Ugen{
		Name:         "Control",
		Rate:         KR,
		SpecialIndex: 0,
		Outputs:      outputs,
	}
}
250781
func NewRemoteService(
	rpcClient cluster.RPCClient,
	rpcServer cluster.RPCServer,
	sd cluster.ServiceDiscovery,
	encoder codec.PacketEncoder,
	serializer serialize.Serializer,
	router *router.Router,
	messageEncoder message.Encoder,
	server *cluster.Server,
) *RemoteService {
	return &RemoteService{
		services:               make(map[string]*component.Service),
		rpcClient:              rpcClient,
		rpcServer:              rpcServer,
		encoder:                encoder,
		serviceDiscovery:       sd,
		serializer:             serializer,
		router:                 router,
		messageEncoder:         messageEncoder,
		server:                 server,
		remoteBindingListeners: make([]cluster.RemoteBindingListener, 0),
	}
}
1358971
func NewImpersonatingRoundTripper(impersonate ImpersonationConfig, delegate http.RoundTripper) http.RoundTripper {
	return &impersonatingRoundTripper{impersonate, delegate}
}