api

package
v0.0.0-...-e47a716 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

pprof.proto

It has these top-level messages:

Chunk
CmdlineRequest
CmdlineResponse
CPUProfileRequest
TraceRequest
SymbolRequest
LookupRequest
SymbolResponse
LookupResponse

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPprof = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPprof   = fmt.Errorf("proto: integer overflow")
)

Functions

func NewChunkReader

func NewChunkReader(recv ChunkReceiver) io.Reader

NewChunkReader creates an io.Reader from a ChunkReceiver. The reader works to stitch back together Chunks (a protobuf encapsulated stream of bytes) as a single stream.

func NewChunkWriter

func NewChunkWriter(sender ChunkSender) io.Writer

NewChunkWriter creates an io.Writer from a `ChunkSender`. This can be useful for passing a stream down into lower-level parts of the system w/o having to manually deal with the chunking required by the protocol.

func RegisterPProfServiceServer

func RegisterPProfServiceServer(s *grpc.Server, srv PProfServiceServer)

Types

type CPUProfileRequest

type CPUProfileRequest struct {
	Duration *google_protobuf.Duration `protobuf:"bytes,1,opt,name=duration" json:"duration,omitempty"`
}

CPURequest is used with the `PProfService` `CPU` endpoint.

func (*CPUProfileRequest) Descriptor

func (*CPUProfileRequest) Descriptor() ([]byte, []int)

func (*CPUProfileRequest) GetDuration

func (m *CPUProfileRequest) GetDuration() *google_protobuf.Duration

func (*CPUProfileRequest) Marshal

func (m *CPUProfileRequest) Marshal() (dAtA []byte, err error)

func (*CPUProfileRequest) MarshalTo

func (m *CPUProfileRequest) MarshalTo(dAtA []byte) (int, error)

func (*CPUProfileRequest) ProtoMessage

func (*CPUProfileRequest) ProtoMessage()

func (*CPUProfileRequest) Reset

func (m *CPUProfileRequest) Reset()

func (*CPUProfileRequest) Size

func (m *CPUProfileRequest) Size() (n int)

func (*CPUProfileRequest) String

func (m *CPUProfileRequest) String() string

func (*CPUProfileRequest) Unmarshal

func (m *CPUProfileRequest) Unmarshal(dAtA []byte) error

type Chunk

type Chunk struct {
	Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
}

Chunk is used by endpoints that send opaque chunks of data

func (*Chunk) Descriptor

func (*Chunk) Descriptor() ([]byte, []int)

func (*Chunk) GetChunk

func (m *Chunk) GetChunk() []byte

func (*Chunk) Marshal

func (m *Chunk) Marshal() (dAtA []byte, err error)

func (*Chunk) MarshalTo

func (m *Chunk) MarshalTo(dAtA []byte) (int, error)

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) Reset

func (m *Chunk) Reset()

func (*Chunk) Size

func (m *Chunk) Size() (n int)

func (*Chunk) String

func (m *Chunk) String() string

func (*Chunk) Unmarshal

func (m *Chunk) Unmarshal(dAtA []byte) error

type ChunkReceiver

type ChunkReceiver interface {
	Recv() (*Chunk, error)
}

ChunkReceiver is when creating a chunk reader to be able to accept different streaming endpoints from the API server.

type ChunkSender

type ChunkSender interface {
	Send(*Chunk) error
}

ChunkSender is when creating a chunk writer to be able to accept different streaming endpoints from the API server.

type CmdlineRequest

type CmdlineRequest struct {
}

CmdlineRequest is used by the `PProfService` `Cmdline` endpoint. It is currently just an empty request.

func (*CmdlineRequest) Descriptor

func (*CmdlineRequest) Descriptor() ([]byte, []int)

func (*CmdlineRequest) Marshal

func (m *CmdlineRequest) Marshal() (dAtA []byte, err error)

func (*CmdlineRequest) MarshalTo

func (m *CmdlineRequest) MarshalTo(dAtA []byte) (int, error)

func (*CmdlineRequest) ProtoMessage

func (*CmdlineRequest) ProtoMessage()

func (*CmdlineRequest) Reset

func (m *CmdlineRequest) Reset()

func (*CmdlineRequest) Size

func (m *CmdlineRequest) Size() (n int)

func (*CmdlineRequest) String

func (m *CmdlineRequest) String() string

func (*CmdlineRequest) Unmarshal

func (m *CmdlineRequest) Unmarshal(dAtA []byte) error

type CmdlineResponse

type CmdlineResponse struct {
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
}

CmdlineResponse is responded by the `PProfService` `Cmdline` endpoint. It contains the command line options used to start the running process as a set of null-terminated strings.

func (*CmdlineResponse) Descriptor

func (*CmdlineResponse) Descriptor() ([]byte, []int)

func (*CmdlineResponse) GetCommand

func (m *CmdlineResponse) GetCommand() string

func (*CmdlineResponse) Marshal

func (m *CmdlineResponse) Marshal() (dAtA []byte, err error)

func (*CmdlineResponse) MarshalTo

func (m *CmdlineResponse) MarshalTo(dAtA []byte) (int, error)

func (*CmdlineResponse) ProtoMessage

func (*CmdlineResponse) ProtoMessage()

func (*CmdlineResponse) Reset

func (m *CmdlineResponse) Reset()

func (*CmdlineResponse) Size

func (m *CmdlineResponse) Size() (n int)

func (*CmdlineResponse) String

func (m *CmdlineResponse) String() string

func (*CmdlineResponse) Unmarshal

func (m *CmdlineResponse) Unmarshal(dAtA []byte) error

type LookupRequest

type LookupRequest struct {
	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Debug        int32  `protobuf:"varint,2,opt,name=debug,proto3" json:"debug,omitempty"`
	GcBeforeHeap bool   `protobuf:"varint,3,opt,name=gc_before_heap,json=gcBeforeHeap,proto3" json:"gc_before_heap,omitempty"`
}

LookupRequest is used with the `PProfService` `Lookup` endpoint. It is used to specify the profile data to lookup, e.g. `goroutine`, `heap`. See https://golang.org/pkg/runtime/pprof/#PProf

func (*LookupRequest) Descriptor

func (*LookupRequest) Descriptor() ([]byte, []int)

func (*LookupRequest) GetDebug

func (m *LookupRequest) GetDebug() int32

func (*LookupRequest) GetGcBeforeHeap

func (m *LookupRequest) GetGcBeforeHeap() bool

func (*LookupRequest) GetName

func (m *LookupRequest) GetName() string

func (*LookupRequest) Marshal

func (m *LookupRequest) Marshal() (dAtA []byte, err error)

func (*LookupRequest) MarshalTo

func (m *LookupRequest) MarshalTo(dAtA []byte) (int, error)

func (*LookupRequest) ProtoMessage

func (*LookupRequest) ProtoMessage()

func (*LookupRequest) Reset

func (m *LookupRequest) Reset()

func (*LookupRequest) Size

func (m *LookupRequest) Size() (n int)

func (*LookupRequest) String

func (m *LookupRequest) String() string

func (*LookupRequest) Unmarshal

func (m *LookupRequest) Unmarshal(dAtA []byte) error

type LookupResponse

type LookupResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

LookupResponse is used with the `PProfService` `Lookup` endpoint. containing an opaque blob suitable for consumption by pprof tooling.

func (*LookupResponse) Descriptor

func (*LookupResponse) Descriptor() ([]byte, []int)

func (*LookupResponse) GetData

func (m *LookupResponse) GetData() []byte

func (*LookupResponse) Marshal

func (m *LookupResponse) Marshal() (dAtA []byte, err error)

func (*LookupResponse) MarshalTo

func (m *LookupResponse) MarshalTo(dAtA []byte) (int, error)

func (*LookupResponse) ProtoMessage

func (*LookupResponse) ProtoMessage()

func (*LookupResponse) Reset

func (m *LookupResponse) Reset()

func (*LookupResponse) Size

func (m *LookupResponse) Size() (n int)

func (*LookupResponse) String

func (m *LookupResponse) String() string

func (*LookupResponse) Unmarshal

func (m *LookupResponse) Unmarshal(dAtA []byte) error

type PProfServiceClient

type PProfServiceClient interface {
	Cmdline(ctx context.Context, in *CmdlineRequest, opts ...grpc.CallOption) (*CmdlineResponse, error)
	CPUProfile(ctx context.Context, in *CPUProfileRequest, opts ...grpc.CallOption) (PProfService_CPUProfileClient, error)
	Trace(ctx context.Context, in *TraceRequest, opts ...grpc.CallOption) (PProfService_TraceClient, error)
	Symbol(ctx context.Context, in *SymbolRequest, opts ...grpc.CallOption) (*SymbolResponse, error)
	Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
}

func NewPProfServiceClient

func NewPProfServiceClient(cc *grpc.ClientConn) PProfServiceClient

type PProfService_CPUProfileClient

type PProfService_CPUProfileClient interface {
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type PProfService_CPUProfileServer

type PProfService_CPUProfileServer interface {
	Send(*Chunk) error
	grpc.ServerStream
}

type PProfService_TraceClient

type PProfService_TraceClient interface {
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type PProfService_TraceServer

type PProfService_TraceServer interface {
	Send(*Chunk) error
	grpc.ServerStream
}

type SymbolRequest

type SymbolRequest struct {
	Symbol uint64 `protobuf:"varint,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
}

SymbolRequest is used with the `PProfService` `Symbol` endpoint.

func (*SymbolRequest) Descriptor

func (*SymbolRequest) Descriptor() ([]byte, []int)

func (*SymbolRequest) GetSymbol

func (m *SymbolRequest) GetSymbol() uint64

func (*SymbolRequest) Marshal

func (m *SymbolRequest) Marshal() (dAtA []byte, err error)

func (*SymbolRequest) MarshalTo

func (m *SymbolRequest) MarshalTo(dAtA []byte) (int, error)

func (*SymbolRequest) ProtoMessage

func (*SymbolRequest) ProtoMessage()

func (*SymbolRequest) Reset

func (m *SymbolRequest) Reset()

func (*SymbolRequest) Size

func (m *SymbolRequest) Size() (n int)

func (*SymbolRequest) String

func (m *SymbolRequest) String() string

func (*SymbolRequest) Unmarshal

func (m *SymbolRequest) Unmarshal(dAtA []byte) error

type SymbolResponse

type SymbolResponse struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Symbol uint64 `protobuf:"varint,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
}

SymbolResponse is used with the `PProfService` `Symbol` endpoint. It returns the name/symbol mapping

func (*SymbolResponse) Descriptor

func (*SymbolResponse) Descriptor() ([]byte, []int)

func (*SymbolResponse) GetName

func (m *SymbolResponse) GetName() string

func (*SymbolResponse) GetSymbol

func (m *SymbolResponse) GetSymbol() uint64

func (*SymbolResponse) Marshal

func (m *SymbolResponse) Marshal() (dAtA []byte, err error)

func (*SymbolResponse) MarshalTo

func (m *SymbolResponse) MarshalTo(dAtA []byte) (int, error)

func (*SymbolResponse) ProtoMessage

func (*SymbolResponse) ProtoMessage()

func (*SymbolResponse) Reset

func (m *SymbolResponse) Reset()

func (*SymbolResponse) Size

func (m *SymbolResponse) Size() (n int)

func (*SymbolResponse) String

func (m *SymbolResponse) String() string

func (*SymbolResponse) Unmarshal

func (m *SymbolResponse) Unmarshal(dAtA []byte) error

type TraceRequest

type TraceRequest struct {
	Duration *google_protobuf.Duration `protobuf:"bytes,1,opt,name=duration" json:"duration,omitempty"`
}

CPURequest is used with the `PProfService` `Trace` endpoint.

func (*TraceRequest) Descriptor

func (*TraceRequest) Descriptor() ([]byte, []int)

func (*TraceRequest) GetDuration

func (m *TraceRequest) GetDuration() *google_protobuf.Duration

func (*TraceRequest) Marshal

func (m *TraceRequest) Marshal() (dAtA []byte, err error)

func (*TraceRequest) MarshalTo

func (m *TraceRequest) MarshalTo(dAtA []byte) (int, error)

func (*TraceRequest) ProtoMessage

func (*TraceRequest) ProtoMessage()

func (*TraceRequest) Reset

func (m *TraceRequest) Reset()

func (*TraceRequest) Size

func (m *TraceRequest) Size() (n int)

func (*TraceRequest) String

func (m *TraceRequest) String() string

func (*TraceRequest) Unmarshal

func (m *TraceRequest) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL