veneur: github.com/stripe/veneur/internal/forwardtest Index | Files

package forwardtest

import "github.com/stripe/veneur/internal/forwardtest"

Index

Package Files

server.go

type SendMetricHandler Uses

type SendMetricHandler func([]*metricpb.Metric)

SendMetricHandler is a handler that is called when a Server gets a SendMetrics RPC

type Server Uses

type Server struct {
    *grpc.Server
    // contains filtered or unexported fields
}

Server is a gRPC server similar to httptest.Server

func NewServer Uses

func NewServer(handler SendMetricHandler) *Server

NewServer creates an unstarted Server with the specified handler

func (*Server) Addr Uses

func (s *Server) Addr() net.Addr

Addr returns the address the server is listening on.

func (*Server) SendMetrics Uses

func (s *Server) SendMetrics(ctx context.Context, mlist *forwardrpc.MetricList) (*empty.Empty, error)

SendMetrics calls the input SendMetricsHandler whenever it receives an RPC

func (*Server) Start Uses

func (s *Server) Start(t testing.TB)

Start starts the gRPC server listening on the loopback interface on a random port. The address it is listening on can be retrieved from (*Server).Addr()

Package forwardtest imports 8 packages (graph). Updated 2020-01-14. Refresh now. Tools for package owners.