Documentation
¶
Index ¶
Constants ¶
View Source
const ( VERSION = "v4.2.1" AUTHOR = "lixy<[email protected]>; cinvanlee<[email protected]>" FilePerm = 0644 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
Args *Args
EnvProfile bool
LogFile *os.File
LogExpire time.Duration
BeatFreQ time.Duration
LogL *LogLauncher
ConfigL *ProfileLauncher
SignalL *SignalLauncher
LFunc []LauncherFunc
Launchers []AgentLauncher
Context context.Context
Cancel context.CancelFunc
Wg *sync.WaitGroup
Handlers []common.AgentHandler
SigBus *SignalBus
// contains filtered or unexported fields
}
func New ¶
func New(lfs ...LauncherFunc) *Agent
func (*Agent) RegisterHandler ¶
func (a *Agent) RegisterHandler(handlers ...common.AgentHandler)
type AgentLauncher ¶
type Args ¶
type LauncherFunc ¶
func WithLauncher ¶
func WithLauncher(launcher AgentLauncher) LauncherFunc
type LogLauncher ¶
type LogLauncher struct {
LogExpire time.Duration
Logfile *os.File
// contains filtered or unexported fields
}
func NewLog ¶
func NewLog() *LogLauncher
func (*LogLauncher) Init ¶
func (l *LogLauncher) Init(agent *Agent) error
func (*LogLauncher) Run ¶
func (l *LogLauncher) Run() error
func (*LogLauncher) Shutdown ¶
func (l *LogLauncher) Shutdown()
func (*LogLauncher) Stop ¶
func (l *LogLauncher) Stop()
type ProfileLauncher ¶
type ProfileLauncher struct {
FromEnvVar bool
Profile *Profile
ProfileUpdate bool
// contains filtered or unexported fields
}
func NewProfile ¶
func NewProfile() *ProfileLauncher
func (*ProfileLauncher) Init ¶
func (p *ProfileLauncher) Init(agent *Agent) error
func (*ProfileLauncher) Parse ¶
func (p *ProfileLauncher) Parse() error
func (*ProfileLauncher) Run ¶
func (p *ProfileLauncher) Run() error
func (*ProfileLauncher) Shutdown ¶
func (p *ProfileLauncher) Shutdown()
func (*ProfileLauncher) Stop ¶
func (p *ProfileLauncher) Stop()
type SignalLauncher ¶
type SignalLauncher struct {
// contains filtered or unexported fields
}
func NewSignal ¶
func NewSignal() *SignalLauncher
func (*SignalLauncher) Init ¶
func (s *SignalLauncher) Init(agent *Agent) error
func (*SignalLauncher) Run ¶
func (s *SignalLauncher) Run() error
func (*SignalLauncher) Shutdown ¶
func (s *SignalLauncher) Shutdown()
func (*SignalLauncher) Stop ¶
func (s *SignalLauncher) Stop()
Click to show internal directories.
Click to hide internal directories.