Documentation ¶
Index ¶
- type Agent
- func (agent *Agent) BinaryDump(_ *empty.Empty, profileServer proto.ProfileService_BinaryDumpServer) (err error)
- func (agent *Agent) GC(context.Context, *empty.Empty) (*empty.Empty, error)
- func (agent *Agent) GetInfo(context.Context, *empty.Empty) (*proto.InfoType, error)
- func (agent *Agent) LookupProfile(inputType *proto.LookupProfileInputType, ...) error
- func (agent *Agent) NonLookupProfile(inputType *proto.NonLookupProfileInputType, ...) error
- func (agent *Agent) Ping(context.Context, *empty.Empty) (*proto.StringType, error)
- func (agent *Agent) Set(_ context.Context, inputType *proto.SetProfileInputType) (*proto.IntType, error)
- func (agent *Agent) SetOption(option *ServerOption) error
- func (agent *Agent) SetOptions(options ...*ServerOption) (err error)
- func (agent *Agent) Start(serverAddress string) (addr *net.TCPAddr, err error)
- func (agent *Agent) Stop()
- func (agent *Agent) StopNonLookupProfile(_ context.Context, profileType *proto.NonLookupProfileType) (*empty.Empty, error)
- type ServerOption
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) 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 ¶
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) 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