...

Package api

import "github.com/linkerd/linkerd2/viz/tap/api"
Overview
Index

Overview ▾

func Main

func Main(args []string)

Main executes the tap subcommand

func NewClient

func NewClient(addr string) (pb.TapClient, *grpc.ClientConn, error)

NewClient creates a client for the control-plane's Tap service.

type GRPCTapServer

GRPCTapServer describes the gRPC server implementing pb.TapServer

type GRPCTapServer struct {
    tapPb.UnimplementedTapServer
    // contains filtered or unexported fields
}

func NewGrpcTapServer

func NewGrpcTapServer(
    tapPort uint,
    controllerNamespace string,
    trustDomain string,
    k8sAPI *k8s.API,
    ignoreHeaders map[string]bool,
) (*GRPCTapServer, error)

NewGrpcTapServer creates a new gRPC Tap server

func (*GRPCTapServer) Tap

func (s *GRPCTapServer) Tap(req *tapPb.TapRequest, stream tapPb.Tap_TapServer) error

Tap is deprecated, use TapByResource. This API endpoint is marked as deprecated but it's still used.

func (*GRPCTapServer) TapByResource

func (s *GRPCTapServer) TapByResource(req *tapPb.TapByResourceRequest, stream tapPb.Tap_TapByResourceServer) error

TapByResource taps all resources matched by the request object.

type Server

Server holds the underlying http server and its config

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

func NewServer

func NewServer(
    ctx context.Context,
    addr string,
    k8sAPI *k8s.API,
    grpcTapServer pb.TapServer,
    disableCommonNames bool,
) (*Server, error)

NewServer creates a new server that implements the Tap APIService.

func (*Server) ServeHTTP

func (a *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP handles all routes for the Server.

func (*Server) Start

func (a *Server) Start(ctx context.Context)

Start starts the https server