mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
* Add Prometheus server * Add Prometheus gRPC metrics * Add BlossomSub metrics --------- Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com>
18 lines
490 B
Go
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...)...)
|
|
}
|