Documentation ¶
Index ¶
- Variables
- func ChecksKey(strictness string, serviceNames []string) string
- func TimeoutContext(timeout time.Duration) context.Context
- type Check
- type CommandRequest
- type CompositeQueryResult
- type Config
- type Elastic
- type ElasticService
- func (o *ElasticService) Close()
- func (o *ElasticService) Init() (err error)
- func (o *ElasticService) Name() string
- func (o *ElasticService) NewExecutor(req *CommandRequest) (ret Executor, err error)
- func (o *ElasticService) NewExporter(req *ExportRequest) (ret Exporter, err error)
- func (o *ElasticService) NewСheck(req *ValidationRequest) (ret Check, err error)
- func (o *ElasticService) Ping() (err error)
- type Executor
- type ExportRequest
- type Exporter
- type Eye
- func (o *Eye) Check(checkName string) (err error)
- func (o *Eye) Close()
- func (o *Eye) CompareAll(serviceNames []string, req *ValidationRequest) (err error)
- func (o *Eye) CompareRunning(serviceNames []string, req *ValidationRequest) (err error)
- func (o *Eye) Execute(executorName string, params map[string]string) (err error)
- func (o *Eye) Export(exportName string, params map[string]string) (err error)
- func (o *Eye) Ping(serviceName string) (err error)
- func (o *Eye) PingAll(serviceNames []string) (err error)
- func (o *Eye) PingAny(serviceNames []string) (err error)
- func (o *Eye) UpdateConfig(config *Config)
- func (o *Eye) Validate(serviceName string, req *ValidationRequest) (err error)
- func (o *Eye) ValidateAll(serviceNames []string, req *ValidationRequest) (err error)
- func (o *Eye) ValidateAny(serviceNames []string, req *ValidationRequest) (err error)
- func (o *Eye) ValidateRunning(serviceNames []string, req *ValidationRequest) (err error)
- type Factory
- type FieldsExporter
- type FileExporter
- type FileInfo
- type Fs
- type FsCheck
- type FsService
- func (o *FsService) Close()
- func (o *FsService) Files(file string) (ret []*FileInfo, err error)
- func (o *FsService) FilesWithFilter(file string, eval *govaluate.EvaluableExpression) (ret []*FileInfo, err error)
- func (o *FsService) Init() (err error)
- func (o *FsService) Name() string
- func (o *FsService) NewExecutor(req *CommandRequest) (ret Executor, err error)
- func (o *FsService) NewExporter(req *ExportRequest) (ret Exporter, err error)
- func (o *FsService) NewСheck(req *ValidationRequest) (ret Check, err error)
- func (o *FsService) Ping() (err error)
- type Http
- type HttpService
- func (o *HttpService) Close()
- func (o *HttpService) Init() (err error)
- func (o *HttpService) Name() string
- func (o *HttpService) NewExecutor(req *CommandRequest) (ret Executor, err error)
- func (o *HttpService) NewExporter(req *ExportRequest) (ret Exporter, err error)
- func (o *HttpService) NewСheck(req *ValidationRequest) (ret Check, err error)
- func (o *HttpService) Ping() error
- type MapQueryResult
- type MultiCheck
- type MultiPing
- type MultiValidate
- type MySql
- type MySqlService
- func (o *MySqlService) Close()
- func (o *MySqlService) Init() (err error)
- func (o *MySqlService) Name() string
- func (o *MySqlService) NewExecutor(req *CommandRequest) (ret Executor, err error)
- func (o *MySqlService) NewExporter(req *ExportRequest) (ret Exporter, err error)
- func (o *MySqlService) NewСheck(req *ValidationRequest) (ret Check, err error)
- func (o *MySqlService) Ping() (err error)
- type PingCheck
- type Proc
- type Ps
- type PsCheck
- type PsService
- func (o *PsService) Close()
- func (o *PsService) Init() (err error)
- func (o *PsService) Name() string
- func (o *PsService) NewExecutor(req *CommandRequest) (ret Executor, err error)
- func (o *PsService) NewExporter(req *ExportRequest) (ret Exporter, err error)
- func (o *PsService) NewСheck(req *ValidationRequest) (ret Check, err error)
- func (o *PsService) Ping() (err error)
- func (o *PsService) Processes() (ret []*Proc, err error)
- type Query
- type QueryResult
- type QueryResultMapWriter
- type QueryResults
- type Service
- type SimpleExecutor
- type SimpleServiceFactory
- type ValidateCheck
- type ValidationRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = lg.NewLogger("EYE ")
Functions ¶
Types ¶
type CommandRequest ¶
type CommandRequest struct { }
type CompositeQueryResult ¶
type CompositeQueryResult struct { Splitter *regexp.Regexp Data []QueryResult }
func NewCompositeQueryResult ¶
func NewCompositeQueryResult(separator string, data []QueryResult) (ret *CompositeQueryResult, err error)
func (*CompositeQueryResult) Get ¶
func (o *CompositeQueryResult) Get(name string) (ret interface{}, err error)
func (*CompositeQueryResult) String ¶
func (o *CompositeQueryResult) String() (ret string)
type Config ¶
type Config struct { Name string `default:"Eye"` Port int `default:"3000"` Debug bool `default:true` ExportFolder string `default:"./export"` AppHome string `default:"."` MySql []*MySql Http []*Http Fs []*Fs Ps []*Ps Elastic []*Elastic PingAny []*PingCheck PingAll []*PingCheck Validate []*ValidateCheck ValidateAny []*ValidateCheck ValidateRunning []*ValidateCheck ValidateAll []*ValidateCheck CompareRunning []*ValidateCheck CompareAll []*ValidateCheck FieldsExporter []*FieldsExporter FileExporter []*FileExporter Executor []*SimpleExecutor ConfigFiles []string ConfigSuffixes []string }
func LoadConfig ¶
func (*Config) ExtractAccessKeys ¶
type ElasticService ¶
type ElasticService struct {
// contains filtered or unexported fields
}
func (*ElasticService) Close ¶
func (o *ElasticService) Close()
func (*ElasticService) Init ¶
func (o *ElasticService) Init() (err error)
func (*ElasticService) Name ¶
func (o *ElasticService) Name() string
func (*ElasticService) NewExecutor ¶
func (o *ElasticService) NewExecutor(req *CommandRequest) (ret Executor, err error)
func (*ElasticService) NewExporter ¶
func (o *ElasticService) NewExporter(req *ExportRequest) (ret Exporter, err error)
func (*ElasticService) NewСheck ¶
func (o *ElasticService) NewСheck(req *ValidationRequest) (ret Check, err error)
func (*ElasticService) Ping ¶
func (o *ElasticService) Ping() (err error)
type ExportRequest ¶
type ExportRequest struct { Query string EvalExpr string Convert func(map[string]interface{}) (io.Reader, error) CreateOut func(params map[string]string) (io.WriteCloser, error) }
func (*ExportRequest) ExportKey ¶
func (o *ExportRequest) ExportKey(serviceName string) string
type Eye ¶
type Eye struct {
// contains filtered or unexported fields
}
func (*Eye) CompareAll ¶
func (o *Eye) CompareAll(serviceNames []string, req *ValidationRequest) (err error)
func (*Eye) CompareRunning ¶
func (o *Eye) CompareRunning(serviceNames []string, req *ValidationRequest) (err error)
func (*Eye) UpdateConfig ¶
func (*Eye) Validate ¶
func (o *Eye) Validate(serviceName string, req *ValidationRequest) (err error)
func (*Eye) ValidateAll ¶
func (o *Eye) ValidateAll(serviceNames []string, req *ValidationRequest) (err error)
func (*Eye) ValidateAny ¶
func (o *Eye) ValidateAny(serviceNames []string, req *ValidationRequest) (err error)
func (*Eye) ValidateRunning ¶
func (o *Eye) ValidateRunning(serviceNames []string, req *ValidationRequest) (err error)
type FieldsExporter ¶
type FileExporter ¶
type FileInfo ¶
type Fs ¶
type Fs struct { Name string File string PingRequest *ValidationRequest }
type FsCheck ¶
type FsCheck struct {
// contains filtered or unexported fields
}
buildCheck
func (*FsCheck) Query ¶
func (o *FsCheck) Query() (ret QueryResults, err error)
type FsService ¶
type FsService struct { Fs *Fs // contains filtered or unexported fields }
func (*FsService) FilesWithFilter ¶
func (*FsService) NewExecutor ¶
func (o *FsService) NewExecutor(req *CommandRequest) (ret Executor, err error)
func (*FsService) NewExporter ¶
func (o *FsService) NewExporter(req *ExportRequest) (ret Exporter, err error)
type HttpService ¶
type HttpService struct {
// contains filtered or unexported fields
}
func (*HttpService) Close ¶
func (o *HttpService) Close()
func (*HttpService) Init ¶
func (o *HttpService) Init() (err error)
func (*HttpService) Name ¶
func (o *HttpService) Name() string
func (*HttpService) NewExecutor ¶
func (o *HttpService) NewExecutor(req *CommandRequest) (ret Executor, err error)
func (*HttpService) NewExporter ¶
func (o *HttpService) NewExporter(req *ExportRequest) (ret Exporter, err error)
func (*HttpService) NewСheck ¶
func (o *HttpService) NewСheck(req *ValidationRequest) (ret Check, err error)
func (*HttpService) Ping ¶
func (o *HttpService) Ping() error
type MapQueryResult ¶
type MapQueryResult struct {
Data map[string]interface{}
}
func (*MapQueryResult) Get ¶
func (o *MapQueryResult) Get(name string) (ret interface{}, err error)
func (*MapQueryResult) String ¶
func (o *MapQueryResult) String() (ret string)
type MultiCheck ¶
type MultiCheck struct {
// contains filtered or unexported fields
}
func (*MultiCheck) Info ¶
func (o *MultiCheck) Info() string
func (*MultiCheck) Query ¶
func (o *MultiCheck) Query() (data QueryResults, err error)
func (*MultiCheck) Validate ¶
func (o *MultiCheck) Validate() (err error)
type MultiPing ¶
type MultiPing struct {
// contains filtered or unexported fields
}
func (*MultiPing) Query ¶
func (o *MultiPing) Query() (data QueryResults, err error)
type MultiValidate ¶
type MultiValidate struct {
// contains filtered or unexported fields
}
func (*MultiValidate) Info ¶
func (o *MultiValidate) Info() string
func (*MultiValidate) Query ¶
func (o *MultiValidate) Query() (data QueryResults, err error)
func (*MultiValidate) Validate ¶
func (o *MultiValidate) Validate() (err error)
type MySqlService ¶
type MySqlService struct {
// contains filtered or unexported fields
}
func (*MySqlService) Close ¶
func (o *MySqlService) Close()
func (*MySqlService) Init ¶
func (o *MySqlService) Init() (err error)
func (*MySqlService) Name ¶
func (o *MySqlService) Name() string
func (*MySqlService) NewExecutor ¶
func (o *MySqlService) NewExecutor(req *CommandRequest) (ret Executor, err error)
func (*MySqlService) NewExporter ¶
func (o *MySqlService) NewExporter(req *ExportRequest) (ret Exporter, err error)
func (*MySqlService) NewСheck ¶
func (o *MySqlService) NewСheck(req *ValidationRequest) (ret Check, err error)
func (*MySqlService) Ping ¶
func (o *MySqlService) Ping() (err error)
type Ps ¶
type Ps struct { Name string PingRequest *ValidationRequest }
type PsCheck ¶
type PsCheck struct {
// contains filtered or unexported fields
}
buildCheck
func (*PsCheck) Query ¶
func (o *PsCheck) Query() (ret QueryResults, err error)
type PsService ¶
type PsService struct { Ps *Ps // contains filtered or unexported fields }
func (*PsService) NewExecutor ¶
func (o *PsService) NewExecutor(req *CommandRequest) (ret Executor, err error)
func (*PsService) NewExporter ¶
func (o *PsService) NewExporter(req *ExportRequest) (ret Exporter, err error)
type Query ¶
type Query interface { Info() string Query() (QueryResults, error) }
type QueryResult ¶
type QueryResultMapWriter ¶
type QueryResultMapWriter struct {
Data []QueryResult
}
func NewQueryResultMapWriter ¶
func NewQueryResultMapWriter() *QueryResultMapWriter
func (*QueryResultMapWriter) WriteMap ¶
func (o *QueryResultMapWriter) WriteMap(data map[string]interface{}) error
type QueryResults ¶
type QueryResults []QueryResult
func ComposeQueryResults ¶
func ComposeQueryResults(separator string, results []QueryResults) (ret QueryResults, err error)
func (*QueryResults) String ¶
func (o *QueryResults) String() (ret string)
type Service ¶
type Service interface { Name() string Init() error Close() Ping() error NewСheck(req *ValidationRequest) (Check, error) NewExporter(req *ExportRequest) (Exporter, error) NewExecutor(req *CommandRequest) (Executor, error) }
type SimpleExecutor ¶
type SimpleServiceFactory ¶
type SimpleServiceFactory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory() *SimpleServiceFactory
func (*SimpleServiceFactory) Add ¶
func (o *SimpleServiceFactory) Add(service Service)
func (*SimpleServiceFactory) Close ¶
func (o *SimpleServiceFactory) Close()
type ValidateCheck ¶
type ValidateCheck struct { Name string Services []string Request *ValidationRequest }
type ValidationRequest ¶
func NewValidationRequest ¶
func NewValidationRequest(query string, evalExp string) *ValidationRequest
func (*ValidationRequest) CheckKey ¶
func (o *ValidationRequest) CheckKey(serviceName string) string
Click to show internal directories.
Click to hide internal directories.