Documentation ¶
Index ¶
- type Ctx
- func (adam *Ctx) CertsGet(devUUID uuid.UUID) (out string, err error)
- func (adam *Ctx) ConfigGet(devUUID uuid.UUID) (out string, err error)
- func (adam *Ctx) ConfigSet(devUUID uuid.UUID, devConfig []byte) (err error)
- func (adam *Ctx) DeviceGetByOnboard(eveCert string) (devUUID uuid.UUID, err error)
- func (adam *Ctx) DeviceGetByOnboardUUID(onboardUUID string) (devUUID uuid.UUID, err error)
- func (adam *Ctx) DeviceGetOnboard(devUUID uuid.UUID) (onboardUUID uuid.UUID, err error)
- func (adam *Ctx) DeviceList(filter types.DeviceStateFilter) (out []string, err error)
- func (adam *Ctx) DeviceRemove(devUUID uuid.UUID) (err error)
- func (adam *Ctx) FlowLogChecker(devUUID uuid.UUID, q map[string]string, handler eflowlog.HandlerFunc, ...) (err error)
- func (adam *Ctx) FlowLogLastCallback(devUUID uuid.UUID, q map[string]string, handler eflowlog.HandlerFunc) (err error)
- func (adam *Ctx) GetDeviceCert(device *device.Ctx) (deviceCert *types.DeviceCert, err error)
- func (adam *Ctx) GetDir() (dir string)
- func (adam *Ctx) InfoChecker(devUUID uuid.UUID, q map[string]string, handler einfo.HandlerFunc, ...) (err error)
- func (adam *Ctx) InfoLastCallback(devUUID uuid.UUID, q map[string]string, handler einfo.HandlerFunc) (err error)
- func (adam *Ctx) InitWithVars(vars *utils.ConfigVars) error
- func (adam *Ctx) LogAppsChecker(devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, ...) (err error)
- func (adam *Ctx) LogAppsLastCallback(devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, ...) (err error)
- func (adam *Ctx) LogChecker(devUUID uuid.UUID, q map[string]string, handler elog.HandlerFunc, ...) (err error)
- func (adam *Ctx) LogLastCallback(devUUID uuid.UUID, q map[string]string, handler elog.HandlerFunc) (err error)
- func (adam *Ctx) MetricChecker(devUUID uuid.UUID, q map[string]string, handler emetric.HandlerFunc, ...) (err error)
- func (adam *Ctx) MetricLastCallback(devUUID uuid.UUID, q map[string]string, handler emetric.HandlerFunc) (err error)
- func (adam *Ctx) OnboardRemove(onboardUUID string) (err error)
- func (adam *Ctx) Register(device *device.Ctx) error
- func (adam *Ctx) RequestLastCallback(devUUID uuid.UUID, q map[string]string, handler erequest.HandlerFunc) (err error)
- func (adam *Ctx) UploadDeviceCert(deviceCert types.DeviceCert) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ctx ¶
type Ctx struct { AdamRemote bool AdamRemoteRedis bool //use redis for obtain logs and info AdamRedisURLEden string //string with redis url for obtain logs and info AdamCaching bool //enable caching of adam`s logs/info AdamCachingRedis bool //caching to redis instead of files AdamCachingPrefix string //custom prefix for file or stream naming for cache // contains filtered or unexported fields }
Ctx stores controller settings
func (*Ctx) DeviceGetByOnboard ¶
DeviceGetByOnboard try to get device by onboard eveCert
func (*Ctx) DeviceGetByOnboardUUID ¶
DeviceGetByOnboardUUID try to get device by onboard uuid
func (*Ctx) DeviceGetOnboard ¶
DeviceGetOnboard get device onboardUUID for devUUID
func (*Ctx) DeviceList ¶
func (adam *Ctx) DeviceList(filter types.DeviceStateFilter) (out []string, err error)
DeviceList return device list
func (*Ctx) DeviceRemove ¶
DeviceRemove remove device by devUUID
func (*Ctx) FlowLogChecker ¶
func (adam *Ctx) FlowLogChecker(devUUID uuid.UUID, q map[string]string, handler eflowlog.HandlerFunc, mode eflowlog.FlowLogCheckerMode, timeout time.Duration) (err error)
FlowLogChecker check FlowLogs by pattern from existence files with FlowLogLast and use FlowLogWatchWithTimeout with timeout for observe new files
func (*Ctx) FlowLogLastCallback ¶
func (adam *Ctx) FlowLogLastCallback(devUUID uuid.UUID, q map[string]string, handler eflowlog.HandlerFunc) (err error)
FlowLogLastCallback check FlowLogs by pattern from existence files with callback
func (*Ctx) GetDeviceCert ¶
GetDeviceCert gets deviceCert contains certificates and serial
func (*Ctx) InfoChecker ¶
func (adam *Ctx) InfoChecker(devUUID uuid.UUID, q map[string]string, handler einfo.HandlerFunc, mode einfo.InfoCheckerMode, timeout time.Duration) (err error)
InfoChecker checks the information in the regular expression pattern 'query' and processes the info.ZInfoMsg found by the function 'handler' from existing files (mode=einfo.InfoExist), new files (mode=einfo.InfoNew) or any of them (mode=einfo.InfoAny) with timeout.
func (*Ctx) InfoLastCallback ¶
func (adam *Ctx) InfoLastCallback(devUUID uuid.UUID, q map[string]string, handler einfo.HandlerFunc) (err error)
InfoLastCallback check info by pattern from existence files with callback
func (*Ctx) InitWithVars ¶
func (adam *Ctx) InitWithVars(vars *utils.ConfigVars) error
InitWithVars use variables from viper for init controller
func (*Ctx) LogAppsChecker ¶
func (adam *Ctx) LogAppsChecker(devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, handler eapps.HandlerFunc, mode eapps.LogCheckerMode, timeout time.Duration) (err error)
LogAppsChecker check app logs by pattern from existence files with LogLast and use LogWatchWithTimeout with timeout for observe new files
func (*Ctx) LogAppsLastCallback ¶
func (adam *Ctx) LogAppsLastCallback(devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, handler eapps.HandlerFunc) (err error)
LogAppsLastCallback check app logs by pattern from existence files with callback
func (*Ctx) LogChecker ¶
func (adam *Ctx) LogChecker(devUUID uuid.UUID, q map[string]string, handler elog.HandlerFunc, mode elog.LogCheckerMode, timeout time.Duration) (err error)
LogChecker check logs by pattern from existence files with LogLast and use LogWatchWithTimeout with timeout for observe new files
func (*Ctx) LogLastCallback ¶
func (adam *Ctx) LogLastCallback(devUUID uuid.UUID, q map[string]string, handler elog.HandlerFunc) (err error)
LogLastCallback check logs by pattern from existence files with callback
func (*Ctx) MetricChecker ¶
func (adam *Ctx) MetricChecker(devUUID uuid.UUID, q map[string]string, handler emetric.HandlerFunc, mode emetric.MetricCheckerMode, timeout time.Duration) (err error)
MetricChecker check metrics by pattern from existence files with LogLast and use LogWatchWithTimeout with timeout for observe new files
func (*Ctx) MetricLastCallback ¶
func (adam *Ctx) MetricLastCallback(devUUID uuid.UUID, q map[string]string, handler emetric.HandlerFunc) (err error)
MetricLastCallback check metrics by pattern from existence files with callback
func (*Ctx) OnboardRemove ¶
OnboardRemove remove onboard by onboardUUID
func (*Ctx) RequestLastCallback ¶
func (adam *Ctx) RequestLastCallback(devUUID uuid.UUID, q map[string]string, handler erequest.HandlerFunc) (err error)
RequestLastCallback check request by pattern from existence files with callback
func (*Ctx) UploadDeviceCert ¶
func (adam *Ctx) UploadDeviceCert(deviceCert types.DeviceCert) error
UploadDeviceCert upload deviceCert into Adam