echo_plugin

package
v0.0.0-...-69b6b67 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(serverConfig Config, OnPanicHanlder func(panic_err interface{}), logger log.Logger) error

func Init_

func Init_(name string, serverConfig Config, OnPanicHanlder func(panic_err interface{}), logger log.Logger) error

Init a new instance.

If only need one instance, use empty name "". Use GetDefaultInstance() to get.
If you need several instance, run Init() with different <name>. Use GetInstance(<name>) to get.

Types

type Config

type Config struct {
	Port     int
	Tls      bool
	Crt_path string
	Key_path string
}

http_port

type EchoServer

type EchoServer struct {
	*echo.Echo
	Http_port int
	Logger    log.Logger
	Tls       bool
	Crt_path  string
	Key_path  string
	Cert      *tls.Certificate
}

func GetInstance

func GetInstance() *EchoServer

func GetInstance_

func GetInstance_(name string) *EchoServer

func (*EchoServer) CheckStarted

func (s *EchoServer) CheckStarted() bool

check the server is indeed up

func (*EchoServer) Close

func (s *EchoServer) Close()

func (*EchoServer) ReloadCert

func (s *EchoServer) ReloadCert() error

func (*EchoServer) Start

func (s *EchoServer) Start() error

Jump to

Keyboard shortcuts

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