server

package
v0.0.0-...-fdc2232 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestIDKey = &ContextKey{
		Name: "request_id",
	}
)

Functions

func GetMetaHandler

func GetMetaHandler(looker *monitor.Looker) echo.HandlerFunc

func GetRequestID

func GetRequestID(ctx context.Context) string

func GetStreamHandler

func GetStreamHandler(looker *monitor.Looker) echo.HandlerFunc

func LoggerMiddleware

func LoggerMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func NewServer

func NewServer(looker *monitor.Looker) *echo.Echo

func ReqeuestIDWithContext

func ReqeuestIDWithContext(ctx context.Context, requestID string) context.Context

func RequestIDGenerator

func RequestIDGenerator(next echo.HandlerFunc) echo.HandlerFunc

Types

type ContextKey

type ContextKey struct {
	Name string
}

type Meta

type Meta struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Interval    string `json:"interval"`
}

type Stream

type Stream struct {
	Name      string      `json:"name"`
	IsSuccess bool        `json:"is_success"`
	CheckedAt time.Time   `json:"checked_at"`
	Result    interface{} `json:"result"`
	Duration  int64       `json:"duration"`
}

Jump to

Keyboard shortcuts

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