Documentation
¶
Index ¶
- Constants
- func NewBeater(_ *beat.Beat, _ *common.Config) (beat.Beater, error)
- func NewCredentialHandler(credentialCache cache.Cache, agentCacheManager agentCache.Manager) handler.Handler
- type Agent
- type Emitter
- type GwTrafficLogEntry
- type GwTransaction
- type Headers
- type MuleEventEmitter
- type MuleEventEmitterJob
Constants ¶
const (
CacheKeyTimeStamp = "LAST_RUN"
)
Variables ¶
This section is empty.
Functions ¶
func NewCredentialHandler ¶ added in v1.2.5
func NewCredentialHandler(credentialCache cache.Cache, agentCacheManager agentCache.Manager) handler.Handler
NewCredentialHandler creates a Handler for Credential and initializes credential cache with items from agent watch resource cache
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent - mulesoft Beater configuration. Implements the beat.Beater interface.
type Emitter ¶
type Emitter interface {
Start() error
OnConfigChange(gatewayCfg *config.AgentConfig)
}
type GwTrafficLogEntry ¶
type GwTrafficLogEntry struct {
APIName string `json:"apiName"`
InboundTransaction GwTransaction `json:"inbound"`
OutboundTransaction GwTransaction `json:"outbound"`
TraceID string `json:"traceId"`
}
GwTrafficLogEntry - Represents the structure of log entry the agent will receive
type GwTransaction ¶
type GwTransaction struct {
DesHost string `json:"destHost"`
DestPort int `json:"destPort"`
ID string `json:"id"`
Method string `json:"method"`
RequestBytes int `json:"requestByte"`
RequestHeaders Headers `json:"requestHeaders"`
ResponseBytes int `json:"responseByte"`
ResponseHeaders Headers `json:"responseHeaders"`
SourceHost string `json:"srcHost"`
SourcePort int `json:"srcPort"`
StatusCode int `json:"statusCode"`
URI string `json:"uri"`
}
GwTransaction - Type for gateway transaction detail
type MuleEventEmitter ¶
type MuleEventEmitter struct {
// contains filtered or unexported fields
}
MuleEventEmitter - Gathers analytics data for publishing to Central.
func NewMuleEventEmitter ¶
func NewMuleEventEmitter(config *config.MulesoftConfig, eventChannel chan common.MetricEvent, client anypoint.AnalyticsClient, instanceCache instanceCache) *MuleEventEmitter
NewMuleEventEmitter - Creates a client to poll for events.
func (*MuleEventEmitter) OnConfigChange ¶
func (me *MuleEventEmitter) OnConfigChange(gatewayCfg *config.AgentConfig)
OnConfigChange passes the new config to the client to handle config changes since the MuleEventEmitter only has cache config value references and should not be changed
func (*MuleEventEmitter) Start ¶
func (me *MuleEventEmitter) Start() error
Start retrieves analytics data from anypoint and sends them on the event channel for processing.
type MuleEventEmitterJob ¶
type MuleEventEmitterJob struct {
Emitter
// contains filtered or unexported fields
}
MuleEventEmitterJob wraps an Emitter and implements the Job interface so that it can be executed by the sdk.
func NewMuleEventEmitterJob ¶
func NewMuleEventEmitterJob( emitter Emitter, pollInterval time.Duration, checkStatus hc.CheckStatus, getStatus func(endpoint string) hc.StatusLevel, registerHC healthChecker, ) (*MuleEventEmitterJob, error)
NewMuleEventEmitterJob creates a struct that implements the Emitter and Job interfaces.
func (*MuleEventEmitterJob) Execute ¶
func (m *MuleEventEmitterJob) Execute() error
Execute called by the sdk on each interval.
func (*MuleEventEmitterJob) OnConfigChange ¶
func (m *MuleEventEmitterJob) OnConfigChange(gatewayCfg *config.AgentConfig)
OnConfigChange updates the MuleEventEmitterJob with any config changes, and calls OnConfigChange on the Emitter
func (*MuleEventEmitterJob) Ready ¶
func (m *MuleEventEmitterJob) Ready() bool
Ready determines if the job is ready to run.
func (*MuleEventEmitterJob) Start ¶
func (m *MuleEventEmitterJob) Start() error
Start registers the job with the sdk.
func (*MuleEventEmitterJob) Status ¶
func (m *MuleEventEmitterJob) Status() error
Status Performs a health check for this job before it is executed.