Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway provides a RESTful API into MetricStore's gRPC API.
func NewGateway ¶
func NewGateway(metricStoreAddr, gatewayAddr, certPath, keyPath string, opts ...GatewayOption) *Gateway
NewGateway creates a new Gateway. It will listen on the gatewayAddr and submit requests via gRPC to the MetricStore on metricStoreAddr. Start() must be invoked before using the Gateway.
type GatewayOption ¶
type GatewayOption func(*Gateway)
GatewayOption configures a Gateway.
func WithGatewayBlock ¶
func WithGatewayBlock() GatewayOption
WithGatewayBlock returns a GatewayOption that determines if Start launches a go-routine or not. It defaults to launching a go-routine. If this is set, start will block on serving the HTTP endpoint.
func WithGatewayLogger ¶
func WithGatewayLogger(l *log.Logger) GatewayOption
WithGatewayLogger returns a GatewayOption that configures the logger for the Gateway. It defaults to no logging.
func WithGatewayMetricStoreDialOpts ¶
func WithGatewayMetricStoreDialOpts(opts ...grpc.DialOption) GatewayOption
WithGatewayMetricStoreDialOpts returns a GatewayOption that sets grpc.DialOptions on the metric-store dial