ceremonyclient/node/internal/grpc/constructors.go
petricadaipegsp 80c7ec2889
Add initial Prometheus support (#353)
* Add Prometheus server

* Add Prometheus gRPC metrics

* Add BlossomSub metrics

---------

Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com>
2024-11-16 17:53:19 -06:00

18 lines
490 B
Go

package grpc
import (
"context"
"google.golang.org/grpc"
)
// NewServer returns a new grpc.Server with the given options.
func NewServer(opts ...grpc.ServerOption) *grpc.Server {
return grpc.NewServer(ServerOptions(opts...)...)
}
// DialContext returns a new grpc.ClientConn with the given target and options.
func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
return grpc.DialContext(ctx, target, ClientOptions(opts...)...)
}