// NewCustom initializes panel with a singlestat panel.
194017
func NewCustom(title string) *Panel {
	if title == "" {
		title = "Panel Title"
	}
	render := "flot"
	return &Panel{
		commonPanel: commonPanel{
			OfType:   CustomType,
			Title:    title,
			Type:     "singlestat",
			Renderer: &render,
			IsNew:    true},
		CustomPanel: &CustomPanel{}}
}
544061
func New(conn *grpc.ClientConn, tracer stdopentracing.Tracer, logger log.Logger, opts ...Option) Service {
	clientOpts := &options{
		limiterRate:     100,
		limiterCapacity: 100,
	}
	for _, opt := range opts {
		opt(clientOpts)
	}
	limiter := ratelimit.NewTokenBucketLimiter(jujuratelimit.NewBucketWithRate(clientOpts.limiterRate, clientOpts.limiterCapacity))
	circuitbreaker := circuitbreaker.Gobreaker(gobreaker.NewCircuitBreaker(gobreaker.Settings{Name: "SessionManagement"}))
	var createSessionEndpoint endpoint.Endpoint
	{
		createSessionEndpoint = grpctransport.NewClient(
			conn,
			"SessionManagement",
			"CreateSession",
			noop,
			noop,
			pb.CreateSessionReply{},
			grpctransport.ClientBefore(kitty.ToGRPCRequest(tracer, logger)),
		).Endpoint()
		createSessionEndpoint = opentracing.TraceClient(tracer, "Create session")(createSessionEndpoint)
		createSessionEndpoint = kitty.EndpointTracingMiddleware(createSessionEndpoint)
		createSessionEndpoint = limiter(createSessionEndpoint)
		createSessionEndpoint = circuitbreaker(createSessionEndpoint)
	}
	var findSessionByTokenEndpoint endpoint.Endpoint
	{
		findSessionByTokenEndpoint = grpctransport.NewClient(
			conn,
			"SessionManagement",
			"FindSessionByToken",
			noop,
			noop,
			pb.FindSessionByTokenReply{},
			grpctransport.ClientBefore(kitty.ToGRPCRequest(tracer, logger)),
		).Endpoint()
		findSessionByTokenEndpoint = opentracing.TraceClient(tracer, "Find session by token")(findSessionByTokenEndpoint)
		findSessionByTokenEndpoint = kitty.EndpointTracingMiddleware(findSessionByTokenEndpoint)
		findSessionByTokenEndpoint = limiter(findSessionByTokenEndpoint)
		findSessionByTokenEndpoint = circuitbreaker(findSessionByTokenEndpoint)
	}
	var deleteSessionByTokenEndpoint endpoint.Endpoint
	{
		deleteSessionByTokenEndpoint = grpctransport.NewClient(
			conn,
			"SessionManagement",
			"DeleteSessionByToken",
			noop,
			noop,
			pb.DeleteSessionByTokenReply{},
			grpctransport.ClientBefore(kitty.ToGRPCRequest(tracer, logger)),
		).Endpoint()
		deleteSessionByTokenEndpoint = opentracing.TraceClient(tracer, "Delete session by token")(deleteSessionByTokenEndpoint)
		deleteSessionByTokenEndpoint = kitty.EndpointTracingMiddleware(deleteSessionByTokenEndpoint)
		deleteSessionByTokenEndpoint = limiter(deleteSessionByTokenEndpoint)
		deleteSessionByTokenEndpoint = circuitbreaker(deleteSessionByTokenEndpoint)
	}
	var deleteSessionsByOwnerTokenEndpoint endpoint.Endpoint
	{
		deleteSessionsByOwnerTokenEndpoint = grpctransport.NewClient(
			conn,
			"SessionManagement",
			"DeleteSessionsByOwnerToken",
			noop,
			noop,
			pb.DeleteSessionsByOwnerTokenReply{},
			grpctransport.ClientBefore(kitty.ToGRPCRequest(tracer, logger)),
		).Endpoint()
		deleteSessionsByOwnerTokenEndpoint = opentracing.TraceClient(tracer, "Delete sessions by owner token")(deleteSessionsByOwnerTokenEndpoint)
		deleteSessionsByOwnerTokenEndpoint = kitty.EndpointTracingMiddleware(deleteSessionsByOwnerTokenEndpoint)
		deleteSessionsByOwnerTokenEndpoint = limiter(deleteSessionsByOwnerTokenEndpoint)
		deleteSessionsByOwnerTokenEndpoint = circuitbreaker(deleteSessionsByOwnerTokenEndpoint)
	}

	return Endpoints{
		CreateSessionEndpoint:              createSessionEndpoint,
		FindSessionByTokenEndpoint:         findSessionByTokenEndpoint,
		DeleteSessionByTokenEndpoint:       deleteSessionByTokenEndpoint,
		DeleteSessionsByOwnerTokenEndpoint: deleteSessionsByOwnerTokenEndpoint,
	}
}
1166709
func NewFormat(source string, quiet bool) formatter.Format {
	switch source {
	case formatter.PrettyFormatKey:
		return secretInspectPrettyTemplate
	case formatter.TableFormatKey:
		if quiet {
			return formatter.DefaultQuietFormat
		}
		return defaultSecretTableFormat
	}
	return formatter.Format(source)
}
134811
func newCmdUpdateCheckInUse(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
	return cli.Command{
		Name:         "check-in-use",
		ArgumentHelp: "",
		Usage:        "Check if we are in use (safe for restart)",
		Action: func(c *cli.Context) {
			cl.SetLogForward(libcmdline.LogForwardNone)
			cl.SetForkCmd(libcmdline.NoFork)
			cl.ChooseCommand(newCmdUpdateCheckInUseRunner(g), "check-in-use", c)
		},
	}
}
92861
func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
	s.SSECustomerAlgorithm = &v
	return s
}
37301
func NewCustomPartitioner(options ...HashPartitionerOption) PartitionerConstructor {
	return func(topic string) Partitioner {
		p := new(hashPartitioner)
		p.random = NewRandomPartitioner(topic)
		p.hasher = fnv.New32a()
		p.referenceAbs = false
		for _, option := range options {
			option(p)
		}
		return p
	}
}
705688
func getTargetCustom(targetCustomFilename string) (*canonicaljson.RawMessage, error) {
	targetCustom := new(canonicaljson.RawMessage)
	rawTargetCustom, err := ioutil.ReadFile(targetCustomFilename)
	if err != nil {
		return nil, err
	}

	if err := targetCustom.UnmarshalJSON(rawTargetCustom); err != nil {
		return nil, err
	}
	return targetCustom, nil
}
817694
func NewMockInstance(ctrl *gomock.Controller) *MockInstance {
	mock := &MockInstance{ctrl: ctrl}
	mock.recorder = &MockInstanceMockRecorder{mock}
	return mock
}
288947
func NewInspectCommand(stdin io.Reader, stdout, stderr io.Writer) *InspectCommand {
	return &InspectCommand{
		CmdIO: pilosa.NewCmdIO(stdin, stdout, stderr),
	}
}
312517
func NewCustomMetricsSpec(config *config.Config) (*CustomMetricsSpec, error) {
	var spec CustomMetricsSpec

	err := config.UnmarshalKey("pitaya.metrics.custom", &spec)
	if err != nil {
		return nil, err
	}

	return &spec, nil
}
355143
func NewCustomQuotaUsersArg(Users []*UserSelectorArg) *CustomQuotaUsersArg {
	s := new(CustomQuotaUsersArg)
	s.Users = Users
	return s
}
247758
func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
	s.SSECustomerAlgorithm = &v
	return s
}
784212
func (a *Astilectron) NewWindow(url string, o *WindowOptions) (*Window, error) {
	return newWindow(a.options, a.Paths(), url, o, a.canceller, a.dispatcher, a.identifier, a.writer)
}
1185047
func (c *Command) MarkFlagCustom(name string, f string) error {
	return MarkFlagCustom(c.Flags(), name, f)
}
776424
func NewMissionAck(TARGET_SYSTEM uint8, TARGET_COMPONENT uint8, TYPE uint8) *MissionAck {
	m := MissionAck{}
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	m.TYPE = TYPE
	return &m
}
146991
func NewCMSketch(d, w int32) *CMSketch {
	tbl := make([][]uint32, d)
	for i := range tbl {
		tbl[i] = make([]uint32, w)
	}
	return &CMSketch{depth: d, width: w, table: tbl}
}
599906
func (o *UplinkConnection) CreateCustomProperty(child *CustomProperty) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}