agent

package
v0.0.0-...-231994c Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent will store GRPC Profile Agent instance. We can create a instance of the agent using `NewAgent()` function

func NewAgent

func NewAgent(options ...*ServerOption) (agent *Agent, err error)

NewAgent function will create a GRPC Profile Agent instance

func (*Agent) BinaryDump

func (agent *Agent) BinaryDump(_ *empty.Empty, profileServer proto.ProfileService_BinaryDumpServer) (err error)

BinaryDump function get the dump of the current binary

func (*Agent) GC

func (agent *Agent) GC(context.Context, *empty.Empty) (*empty.Empty, error)

GC function will run GC on remote agent

func (*Agent) GetInfo

func (agent *Agent) GetInfo(context.Context, *empty.Empty) (*proto.InfoType, error)

GetInfo function will get the current information about the server.

func (*Agent) LookupProfile

func (agent *Agent) LookupProfile(inputType *proto.LookupProfileInputType, profileServer proto.ProfileService_LookupProfileServer) error

LookupProfile will run a profile for lookup pprof type

func (*Agent) NonLookupProfile

func (agent *Agent) NonLookupProfile(inputType *proto.NonLookupProfileInputType, profileServer proto.ProfileService_NonLookupProfileServer) error

NonLookupProfile will run a profile for non lookup pprof type

func (*Agent) Ping

func (agent *Agent) Ping(context.Context, *empty.Empty) (*proto.StringType, error)

Ping function will be used to test the connectivity to the server from client. This function will always return a response contains the word "pong"

func (*Agent) Set

func (agent *Agent) Set(_ context.Context, inputType *proto.SetProfileInputType) (*proto.IntType, error)

Set function will set the GRPC Profile Variable

func (*Agent) SetOption

func (agent *Agent) SetOption(option *ServerOption) error

SetOption function will be used to set `ServerOption` to GRPC Profile Agent

func (*Agent) SetOptions

func (agent *Agent) SetOptions(options ...*ServerOption) (err error)

SetOptions function will be used to set `ServerOption`s to GRPC Profile Agent

func (*Agent) Start

func (agent *Agent) Start(serverAddress string) (addr *net.TCPAddr, err error)

Start function will start GRPC Profile Agent

func (*Agent) Stop

func (agent *Agent) Stop()

Stop function will stop GRPC Profile Agent

func (*Agent) StopNonLookupProfile

func (agent *Agent) StopNonLookupProfile(_ context.Context, profileType *proto.NonLookupProfileType) (*empty.Empty, error)

StopNonLookupProfile will stop non lookup profile type (if running)

type ServerOption

type ServerOption struct {
	// contains filtered or unexported fields
}

ServerOption will create a Option for the GRPC Profile Agent

func ServerAuthTypeInsecure

func ServerAuthTypeInsecure() *ServerOption

ServerAuthTypeInsecure function will create a Insecure Auth type GRPC Profile Agent option

func ServerAuthTypeTLS

func ServerAuthTypeTLS(certFile, keyFile string) *ServerOption

ServerAuthTypeTLS function will create a TLS Secure Auth type GRPC Profile Agent option

Jump to

Keyboard shortcuts

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