logger

package
v0.0.0-...-a837e9c Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Kit

type Kit struct {
	Service       *Service
	Server        *Server
	LogWriter     pzsyslog.Writer
	AuditWriter   pzsyslog.Writer
	Sys           *piazza.SystemConfig
	GenericServer *piazza.GenericServer
	Url           string
	Async         bool
	// contains filtered or unexported fields
}

func NewKit

func NewKit(
	sys *piazza.SystemConfig,
	logWriter pzsyslog.Writer,
	auditWriter pzsyslog.Writer,
	esi elasticsearch.IIndex,
	asyncLogging bool,
	pen string,
) (*Kit, error)

NewKit starts a logger.Server, using a real or mocked ES backend. This is only used for testing.

func (*Kit) Start

func (kit *Kit) Start() error

func (*Kit) Stop

func (kit *Kit) Stop() error

func (*Kit) Wait

func (kit *Kit) Wait() error

type Server

type Server struct {
	Routes []piazza.RouteData
	// contains filtered or unexported fields
}

func (*Server) Init

func (server *Server) Init(service *Service) error

type Service

type Service struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Service) GetRoot

func (service *Service) GetRoot() *piazza.JsonResponse

func (*Service) GetStats

func (service *Service) GetStats() *piazza.JsonResponse

func (*Service) GetSyslog

func (service *Service) GetSyslog(params *piazza.HttpQueryParams) *piazza.JsonResponse

func (*Service) Init

func (service *Service) Init(sys *piazza.SystemConfig, logWriter pzsyslog.Writer, auditWriter pzsyslog.Writer, esi elasticsearch.IIndex, asyncLogging bool, pen string) error

func (*Service) PostQuery

func (service *Service) PostQuery(params *piazza.HttpQueryParams, jsnQuery string) *piazza.JsonResponse

func (*Service) PostSyslog

func (service *Service) PostSyslog(mNew *pzsyslog.Message) *piazza.JsonResponse

type Stats

type Stats struct {
	CreatedOn time.Time `json:"createdOn"`

	// this is the number of messages since the service was started,
	// not the total number of messages in the system
	NumMessages int `json:"numMessages"`

	NumMessagesByApplication map[string]int `json:"numMessagesByApplication"`
}

Jump to

Keyboard shortcuts

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