monitor

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHandler

func MakeHandler(service Service, logger kitlog.Logger, ml machineLearning.Service) http.Handler

MakeHandler returns a restful http handler for the file status service

Types

type FileCheck

type FileCheck struct {
	Location   string `json:"name,omitempty" bson:"Location,omitempty"`
	CheckDate  string `json:"checkdate,omitempty" bson:"CheckDate,omitempty"`
	FileName   string `json:"filename,omitempty" bson:"FileName,omitempty"`
	FileStatus string `json:"filestatus,omitempty" bson:"FileStatus,omitempty"`
}

type Location

type Location struct {
	Tab          string            `json:"tab"`
	LocationName string            `json:"locationname"`
	Date         string            `json:"date"`
	Files        map[string]string `json:"files"`
}

type Response

type Response struct {
	Locations []Location `json:"locations"`
}

type Service

type Service interface {
	StatusResults() Response
	// contains filtered or unexported methods
}

func NewInstrumentService

func NewInstrumentService(counter metrics.Counter, latency metrics.Histogram, s Service) Service

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service) Service

func NewService

func NewService(json jsonFileInteraction.Service, fieldKeys []string, logger log.Logger, store Store, fileStore fileChecker.Store) Service

Create new Filechecker instance in memory for each location

type Store

type Store interface {
	// contains filtered or unexported methods
}

func NewMongoStore

func NewMongoStore(mongo *mgo.Database) Store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL