lnrpc 0.1.0

RPC bindings for github.com/lightningnetwork/lnd
Documentation
// +build !monitoring

package monitoring

import (
	"fmt"

	"google.golang.org/grpc"

	"github.com/lightningnetwork/lnd/lncfg"
)

// GetPromInterceptors returns the set of interceptors for Prometheus
// monitoring if monitoring is enabled, else empty slices. Monitoring is
// currently disabled.
func GetPromInterceptors() ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor) {
	return []grpc.UnaryServerInterceptor{}, []grpc.StreamServerInterceptor{}
}

// ExportPrometheusMetrics is required for lnd to compile so that Prometheus
// metric exporting can be hidden behind a build tag.
func ExportPrometheusMetrics(_ *grpc.Server, _ lncfg.Prometheus) error {
	return fmt.Errorf("lnd must be built with the monitoring tag to " +
		"enable exporting Prometheus metrics")
}