storage

package
v0.0.0-...-c74c9fd Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2016 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	STORAGE_INMEMORY = "In memory"
	STORAGE_ONDISK   = "On disk"

	BOLT_BUCKET = "SmartProxy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TrafficEgress

type TrafficEgress struct {
	Bytes *[]byte
}

type TrafficIngress

type TrafficIngress struct {
	Bytes *[]byte
}

type TrafficStorage

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

func OnDiskTrafficStorage

func OnDiskTrafficStorage() *TrafficStorage

func (*TrafficStorage) CreateTrace

func (storage *TrafficStorage) CreateTrace() *TrafficTrace

func (*TrafficStorage) DisplayLatestTraces

func (storage *TrafficStorage) DisplayLatestTraces(w http.ResponseWriter, route string, max int) int

func (*TrafficStorage) DisplayTraceDetails

func (storage *TrafficStorage) DisplayTraceDetails(w http.ResponseWriter, route string, id string)

func (*TrafficStorage) DisplayTraceIngress

func (storage *TrafficStorage) DisplayTraceIngress(w http.ResponseWriter, route string, id string)

func (*TrafficStorage) GetTraces

func (storage *TrafficStorage) GetTraces(w http.ResponseWriter, route string) int

func (*TrafficStorage) StoreTrace

func (storage *TrafficStorage) StoreTrace(trace *TrafficTrace)

type TrafficStorageInterface

type TrafficStorageInterface interface {
	CreateTrace() *TrafficTrace
	StoreTrace(trace *TrafficTrace)
}

type TrafficTrace

type TrafficTrace struct {
	ID         string // unique identifier of the trace
	Start      time.Time
	End        time.Time
	HttpStatus int
	HttpMethod string
	URI        string
	Length     int
	Ingress    *TrafficIngress
	Egress     *TrafficEgress
}

Jump to

Keyboard shortcuts

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