// NewFxFooYARPCProcedures provides FooYARPCServer procedures to an Fx application.
// It expects a FooYARPCServer to be present in the container.
//
//  fx.Provide(
//    examplepb.NewFxFooYARPCProcedures(),
//    ...
//  )
1183
func NewFxFooYARPCProcedures() interface{} {
	return func(params FxFooYARPCProceduresParams) FxFooYARPCProceduresResult {
		return FxFooYARPCProceduresResult{
			Procedures: BuildFooYARPCProcedures(params.Server),
			ReflectionMeta: reflection.ServerMeta{
				ServiceName:     "uber.yarpc.internal.examples.protobuf.example.Foo",
				FileDescriptors: yarpcFileDescriptorClosure43929dec9f67b739,
			},
		}
	}
}
418622
func PgForeignServerBySrvname(db XODB, srvname pgtypes.Name) (*PgForeignServer, error) {
	var err error

	// sql query
	const sqlstr = `SELECT ` +
		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, srvname, srvowner, srvfdw, srvtype, srvversion, srvacl, srvoptions ` +
		`FROM pg_catalog.pg_foreign_server ` +
		`WHERE srvname = $1`

	// run query
	XOLog(sqlstr, srvname)
	pfs := PgForeignServer{}

	err = db.QueryRow(sqlstr, srvname).Scan(&pfs.Tableoid, &pfs.Cmax, &pfs.Xmax, &pfs.Cmin, &pfs.Xmin, &pfs.Oid, &pfs.Ctid, &pfs.Srvname, &pfs.Srvowner, &pfs.Srvfdw, &pfs.Srvtype, &pfs.Srvversion, &pfs.Srvacl, &pfs.Srvoptions)
	if err != nil {
		return nil, err
	}

	return &pfs, nil
}
1022618
func newFoos(c *SamplecontrollerV1alpha1Client, namespace string) *foos {
	return &foos{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
767904
func (jf openTracingService) AddGrpcServerOptions(addInterceptors func(s grpc.StreamServerInterceptor, u grpc.UnaryServerInterceptor)) {
	addInterceptors(otgrpc.OpenTracingStreamServerInterceptor(jf.Tracer), otgrpc.OpenTracingServerInterceptor(jf.Tracer))
}
298576
func NewRefPaperDoc(DocId string) *RefPaperDoc {
	s := new(RefPaperDoc)
	s.DocId = DocId
	return s
}
546002
func BuildSinkYARPCProcedures(server SinkYARPCServer) []transport.Procedure {
	handler := &_SinkYARPCHandler{server}
	return protobuf.BuildProcedures(
		protobuf.BuildProceduresParams{
			ServiceName:        "uber.yarpc.internal.examples.protobuf.example.Sink",
			UnaryHandlerParams: []protobuf.BuildProceduresUnaryHandlerParams{},
			OnewayHandlerParams: []protobuf.BuildProceduresOnewayHandlerParams{
				{
					MethodName: "Fire",
					Handler: protobuf.NewOnewayHandler(
						protobuf.OnewayHandlerParams{
							Handle:     handler.Fire,
							NewRequest: newSinkServiceFireYARPCRequest,
						},
					),
				},
			},
			StreamHandlerParams: []protobuf.BuildProceduresStreamHandlerParams{},
		},
	)
}
557299
func NewPcfaasController(invClient *integrations.MyInventoryClient) Controller {
	controller := new(pcfaasController)
	controller.inventoryClient = invClient
	return controller
}
1093552
func BuildProcedures(params BuildProceduresParams) []transport.Procedure {
	procedures := make([]transport.Procedure, 0, 2*(len(params.UnaryHandlerParams)+len(params.OnewayHandlerParams)))
	for _, unaryHandlerParams := range params.UnaryHandlerParams {
		procedures = append(
			procedures,
			transport.Procedure{
				Name:        procedure.ToName(params.ServiceName, unaryHandlerParams.MethodName),
				HandlerSpec: transport.NewUnaryHandlerSpec(unaryHandlerParams.Handler),
				Encoding:    Encoding,
			},
			transport.Procedure{
				Name:        procedure.ToName(params.ServiceName, unaryHandlerParams.MethodName),
				HandlerSpec: transport.NewUnaryHandlerSpec(unaryHandlerParams.Handler),
				Encoding:    JSONEncoding,
			},
		)
	}
	for _, onewayHandlerParams := range params.OnewayHandlerParams {
		procedures = append(
			procedures,
			transport.Procedure{
				Name:        procedure.ToName(params.ServiceName, onewayHandlerParams.MethodName),
				HandlerSpec: transport.NewOnewayHandlerSpec(onewayHandlerParams.Handler),
				Encoding:    Encoding,
			},
			transport.Procedure{
				Name:        procedure.ToName(params.ServiceName, onewayHandlerParams.MethodName),
				HandlerSpec: transport.NewOnewayHandlerSpec(onewayHandlerParams.Handler),
				Encoding:    JSONEncoding,
			},
		)
	}
	for _, streamHandlerParams := range params.StreamHandlerParams {
		procedures = append(
			procedures,
			transport.Procedure{
				Name:        procedure.ToName(params.ServiceName, streamHandlerParams.MethodName),
				HandlerSpec: transport.NewStreamHandlerSpec(streamHandlerParams.Handler),
				Encoding:    Encoding,
			},
			transport.Procedure{
				Name:        procedure.ToName(params.ServiceName, streamHandlerParams.MethodName),
				HandlerSpec: transport.NewStreamHandlerSpec(streamHandlerParams.Handler),
				Encoding:    JSONEncoding,
			},
		)
	}
	return procedures
}
1224419
func NewProvider(fs filesystem.Filespace, helpersPath, layoutPath, viewPath, extension string, funcs template.FuncMap) *Provider {
	return &Provider{
		fs:          fs,
		layoutPath:  layoutPath,
		helpersPath: helpersPath,
		viewPath:    viewPath,
		extension:   extension,
		layouts:     map[string]*template.Template{},
		views:       map[string]*template.Template{},
		funcs:       funcs,
	}
}
535337
func (ns nsRefcounts_) CreateOrIncRefOp(coll mongo.Collection, key string, n int) (txn.Op, error) {
	if exists, err := ns.exists(coll, key); err != nil {
		return txn.Op{}, errors.Trace(err)
	} else if !exists {
		return ns.JustCreateOp(coll.Name(), key, n), nil
	}
	return ns.JustIncRefOp(coll.Name(), key, n), nil
}
765305
func EcpFromProto(p *ECP) *FP256BN.ECP {
	return FP256BN.NewECPbigs(FP256BN.FromBytes(p.GetX()), FP256BN.FromBytes(p.GetY()))
}
1340703
func NewFacadeV4(ctx facade.Context) (*APIv4, error) {
	api, err := NewFacadeV5(ctx)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &APIv4{api}, nil
}
1104991
func NewFxOnewayYARPCClient(name string, options ...protobuf.ClientOption) interface{} {
	return func(params FxOnewayYARPCClientParams) FxOnewayYARPCClientResult {
		return FxOnewayYARPCClientResult{
			Client: NewOnewayYARPCClient(params.Provider.ClientConfig(name), options...),
		}
	}
}
1300592
func BuildOnewayYARPCProcedures(server OnewayYARPCServer) []transport.Procedure {
	handler := &_OnewayYARPCHandler{server}
	return protobuf.BuildProcedures(
		protobuf.BuildProceduresParams{
			ServiceName:        "uber.yarpc.internal.crossdock.Oneway",
			UnaryHandlerParams: []protobuf.BuildProceduresUnaryHandlerParams{},
			OnewayHandlerParams: []protobuf.BuildProceduresOnewayHandlerParams{
				{
					MethodName: "Echo",
					Handler: protobuf.NewOnewayHandler(
						protobuf.OnewayHandlerParams{
							Handle:     handler.Echo,
							NewRequest: newOnewayServiceEchoYARPCRequest,
						},
					),
				},
			},
			StreamHandlerParams: []protobuf.BuildProceduresStreamHandlerParams{},
		},
	)
}
1160512
func NewChainProcessor(processors ...Processor) ProcessorFunc {
	return func(in string) (string, bool) {
		out := in
		ok := true
		for _, processor := range processors {
			out, ok = processor.Process(out)
			if !ok {
				return "", false
			}
		}
		return out, ok
	}
}
10618
func BuildKeyValueYARPCProcedures(server KeyValueYARPCServer) []transport.Procedure {
	handler := &_KeyValueYARPCHandler{server}
	return protobuf.BuildProcedures(
		protobuf.BuildProceduresParams{
			ServiceName: "uber.yarpc.internal.examples.protobuf.example.KeyValue",
			UnaryHandlerParams: []protobuf.BuildProceduresUnaryHandlerParams{
				{
					MethodName: "GetValue",
					Handler: protobuf.NewUnaryHandler(
						protobuf.UnaryHandlerParams{
							Handle:     handler.GetValue,
							NewRequest: newKeyValueServiceGetValueYARPCRequest,
						},
					),
				},
				{
					MethodName: "SetValue",
					Handler: protobuf.NewUnaryHandler(
						protobuf.UnaryHandlerParams{
							Handle:     handler.SetValue,
							NewRequest: newKeyValueServiceSetValueYARPCRequest,
						},
					),
				},
			},
			OnewayHandlerParams: []protobuf.BuildProceduresOnewayHandlerParams{},
			StreamHandlerParams: []protobuf.BuildProceduresStreamHandlerParams{},
		},
	)
}
1019204
func NewFollower(client store.Store, key string) *Follower {
	return &Follower{
		client: client,
		key:    key,
		stopCh: make(chan struct{}),
	}
}