Documentation
¶
Index ¶
- Constants
- Variables
- func BuildTapByResourceRequest(params TapRequestParams) (*tapPb.TapByResourceRequest, error)
- func CreateTapEvent(eventHTTP *tapPb.TapEvent_Http, dstMeta map[string]string, ...) *tapPb.TapEvent
- func Reader(ctx context.Context, k8sAPI *k8s.KubernetesAPI, req *pb.TapByResourceRequest) (*bufio.Reader, io.ReadCloser, error)
- func TapReqToURL(req *tapPb.TapByResourceRequest) string
- type TapRequestParams
Constants ¶
const (
// ErrClosedResponseBody is returned when response body is closed in http2
ErrClosedResponseBody = "http2: response body closed"
)
const TapRbacURL = "https://linkerd.io/tap-rbac"
TapRbacURL is the link users should visit to remedy issues when attempting to tap resources with missing authorizations
Variables ¶
var ValidTapDestinations = []string{ k8s.CronJob, k8s.DaemonSet, k8s.Deployment, k8s.Job, k8s.Namespace, k8s.Pod, k8s.ReplicaSet, k8s.ReplicationController, k8s.Service, k8s.StatefulSet, }
ValidTapDestinations specifies resource types allowed as a tap destination: - destination resource on an outbound 'to' query
Functions ¶
func BuildTapByResourceRequest ¶
func BuildTapByResourceRequest(params TapRequestParams) (*tapPb.TapByResourceRequest, error)
BuildTapByResourceRequest builds a Public API TapByResourceRequest from a TapRequestParams.
func CreateTapEvent ¶
func CreateTapEvent(eventHTTP *tapPb.TapEvent_Http, dstMeta map[string]string, proxyDirection tapPb.TapEvent_ProxyDirection) *tapPb.TapEvent
CreateTapEvent generates tap events for use in tests
func Reader ¶
func Reader(ctx context.Context, k8sAPI *k8s.KubernetesAPI, req *pb.TapByResourceRequest) (*bufio.Reader, io.ReadCloser, error)
Reader initiates a TapByResourceRequest and returns a buffered Reader. It is the caller's responsibility to call Close() on the io.ReadCloser.
func TapReqToURL ¶
func TapReqToURL(req *tapPb.TapByResourceRequest) string
TapReqToURL converts a TapByResourceRequest protobuf object to a URL for use with the Kubernetes tap.linkerd.io APIService.
Types ¶
type TapRequestParams ¶
type TapRequestParams struct { Resource string Namespace string ToResource string ToNamespace string MaxRps float32 Scheme string Method string Authority string Path string Extract bool LabelSelector string }
TapRequestParams contains parameters that are used to build a TapByResourceRequest.