// Init a new response
338718
func (r *HiveResponse) Init(context smolder.APIContext) {
	r.Parent = r
	r.Context = context

	r.hives = make(map[string]*bees.BeeFactoryInterface)
}
1335363
func (c *Client) init() error {
	c.HTTPClient = cleanhttp.DefaultClient()
	tlsConfig := &tls.Config{}
	if os.Getenv(atlasTLSNoVerifyEnvVar) != "" {
		tlsConfig.InsecureSkipVerify = true
	}
	err := rootcerts.ConfigureTLS(tlsConfig, &rootcerts.Config{
		CAFile: os.Getenv(atlasCAFileEnvVar),
		CAPath: os.Getenv(atlasCAPathEnvVar),
	})
	if err != nil {
		return err
	}
	t := cleanhttp.DefaultTransport()
	t.TLSClientConfig = tlsConfig
	c.HTTPClient.Transport = t
	return nil
}
679862
func (mr *MockBytesPoolMockRecorder) Init() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockBytesPool)(nil).Init))
}
800873
func (o *lazyObject) init() error {
	o.lock.Lock()
	defer o.lock.Unlock()
	if o.loaded {
		return o.err
	}
	o.mapper, o.err = o.loader()
	o.loaded = true
	return o.err
}
486319
func (c *config) Init() error {
	err := c.handler.Init()
	c.log(INIT, err)
	return err
}
137749
func (h *loaderHandler) Init() error {
	var m = make(map[string]interface{})
	if err := h.loader.Load(&m); err != nil {
		return err
	}
	h.handler = MapUse(m)
	return h.handler.Init()
}
369617
func (mr *MockServiceDiscoveryMockRecorder) Init() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockServiceDiscovery)(nil).Init))
}
686394
func (c *Connection) init(address string, timeout time.Duration) (err error) {

	if c.address == `` {
		c.address = address
	}
	if c.timeout == 0 && timeout != 0 {
		c.timeout = timeout
	}

	if err = c.connect(); err != nil {
		return err
	}

	c.write = make(chan interface{}, 16)
	c.Notifications = make(chan Notification, 16)

	c.responses = make(map[uint32]*chan *rpcResponse)

	go c.reader()
	go c.writer()

	rchan, _ := c.Send(Request{Method: `JSONRPC.Version`}, true)
	if err != nil {
		log.WithField(`error`, err).Error(`Connection closed`)
		return err
	}

	res, err := rchan.Read(c.timeout)
	if err != nil {
		log.WithField(`error`, err).Error(`Kodi responded`)
		return err
	}
	if version := res[`version`].(map[string]interface{}); version != nil {
		if version[`major`].(float64) < KODI_MIN_VERSION {
			return errors.New(`Kodi version too low, upgrade to Frodo or later`)
		}
	}

	return
}
840460
func (m *Module) Init(c *service.Config) {
	c.Setup = func() error {
		m.HTTPRouter = httprouter.New()
		m.ErrorHandler = func(rw http.ResponseWriter, req *http.Request, err error) {
			_ = m.HandleError(rw, req, err)
		}
		m.ErrorPage = func(rw http.ResponseWriter, req *http.Request, status int) {
			http.Error(rw, fmt.Sprint(status), status)
		}

		// root handler
		m.Root = http.NewServeMux()
		m.Root.Handle("/", m.HTTPRouter)
		m.Middleware = middleware.NewServer(m.Root.ServeHTTP)
		m.Config.ReadConfig(&m.config)
		return nil
	}

	c.Start = func() {
		laddr := m.laddr()
		m.Logger.Infof("listening on %s", laddr)
		m.server = &http.Server{Addr: laddr, Handler: m.Middleware}
		go m.server.ListenAndServe()
	}

	c.Stop = func() {
		m.Shutdown(context.Background())
	}
}
79395
func (t *MarblesPrivateChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
	return shim.Success(nil)
}
1091711
func (t *SleeperChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
	args := stub.GetStringArgs()

	if len(args) != 1 {
		return shim.Error("Incorrect number of arguments. Expecting 1")
	}

	sleepTime := args[0]

	t.sleep(sleepTime)

	return shim.Success(nil)
}
1046138
func (c *showOutputCommand) Init(args []string) error {
	switch len(args) {
	case 0:
		return errors.New("no action ID specified")
	case 1:
		c.requestedId = args[0]
		return nil
	default:
		return cmd.CheckEmpty(args[1:])
	}
}
1258910
func (r *Rx) Init(b []byte) {
	r.p.init(b)
	r.tail = 0xfffffffe * jump
	r.head = r.tail
}
1243850
func (e *LedgerQuerier) Init(stub shim.ChaincodeStubInterface) pb.Response {
	qscclogger.Info("Init QSCC")

	return shim.Success(nil)
}
21464
func (s *GRPCServer) Init() error {
	// Create our server
	var opts []grpc.ServerOption
	if s.TLS != nil {
		opts = append(opts, grpc.Creds(credentials.NewTLS(s.TLS)))
	}
	s.server = s.Server(opts)

	// Register the health service
	healthCheck := health.NewServer()
	healthCheck.SetServingStatus(
		GRPCServiceName, grpc_health_v1.HealthCheckResponse_SERVING)
	grpc_health_v1.RegisterHealthServer(s.server, healthCheck)

	// Register the broker service
	brokerServer := newGRPCBrokerServer()
	plugin.RegisterGRPCBrokerServer(s.server, brokerServer)
	s.broker = newGRPCBroker(brokerServer, s.TLS)
	go s.broker.Run()

	// Register the controller
	controllerServer := &grpcControllerServer{
		server: s,
	}
	plugin.RegisterGRPCControllerServer(s.server, controllerServer)

	// Register all our plugins onto the gRPC server.
	for k, raw := range s.Plugins {
		p, ok := raw.(GRPCPlugin)
		if !ok {
			return fmt.Errorf("%q is not a GRPC-compatible plugin", k)
		}

		if err := p.GRPCServer(s.broker, s.server); err != nil {
			return fmt.Errorf("error registering %q: %s", k, err)
		}
	}

	return nil
}
1074999
func (m *Module) Init(c *service.Config) {
	c.Setup = func() error {
		m.BaseAuthenticator = m
		return nil
	}
}
1068411
func (c *removeCommand) Init(args []string) error {
	if len(args) == 0 {
		return errors.Errorf("no username supplied")
	}
	c.UserName = args[0]
	return cmd.CheckEmpty(args[1:])
}