elogger

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

README

Logger - simple http request event logger

This application was build to provide end to end testing example of runtime application.

The end to end test provide uses cases testing log both with index and position based methodology.

Prerequisites:

Enable ssh logic you your use on your machine (on osx System Preference / Sharing / Remote Login )

Download endly

Provide a username and password to login to your box.

endly -c=localhost

Verify that secret file were created

cat ~/.secret/localhost.json
Run E-logger app workflow

Run the following command:

git clone https://github.com/viant/endly
cd endly/example/rt/elogger/endly/

run test with manager workflow:

endly -w=manager

run test with inline workflowrun request

endly -r=run

To check manager workflow tasks list

endly -w=manager -t='?'
 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port     string
	LogTypes []toolbox.FileLoggerConfig
}

Config represents a logger config

type Message

type Message struct {
	Timestamp time.Time
	EventType string
	EventID   string
	ClientIP  string
	ServerIP  string
	Request   *bridge.HttpRequest
	Error     string
}

Message represent event log message

func NewMessage

func NewMessage(request *http.Request) *Message

NewMessage creates a new message for provided request.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents a server

func NewServer

func NewServer(config *Config, service Service) (*Server, error)

NewServer creates a new server with supplied config.

func (*Server) Start

func (s *Server) Start() error

Start start server

type Service

type Service interface {
	Log(http.ResponseWriter, *http.Request) error
}

Service represents a service event logger

func NewService

func NewService(config *Config) (Service, error)

NewService creates a new service for supplied config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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