echoserver

package
v0.0.0-...-8438809 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const NewTokenString = "new_token"

NewTokenString stands for "new_token"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPayload

type AuthPayload struct {
	jwt.StandardClaims
	Typ string `json:"omitempty,typ"`
}

AuthPayload jwt payload

type Config

type Config struct {
	MaxConnection    int32
	Port             int
	EnablePprof      bool
	EnablePrometheus bool
	JwtSecret        string
	HookFunction     HookFunction
}

Config config

type Counter

type Counter int32

Counter type, support atomic inc/dec

func (*Counter) Dec

func (cnt *Counter) Dec() int32

Dec counter--

func (*Counter) Inc

func (cnt *Counter) Inc() int32

Inc counter++

func (*Counter) Value

func (cnt *Counter) Value() int32

Value current counter value

type HookFunction

type HookFunction func(e *echo.Echo)

HookFunction HookFunction function

type Server

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

Server echo server

func NewServer

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

NewServer new server

func (*Server) Start

func (server *Server) Start()

Start server

Jump to

Keyboard shortcuts

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