server

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component func(app *iris.Application)

type Config

type Config struct {
	Listen string
	LogLvl string
}

type Server

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

func New

func New(config Config) (handler *Server)

func (*Server) AdvancedConfig

func (s *Server) AdvancedConfig(handler func(app *iris.Application)) *Server

func (*Server) GetMonitor

func (s *Server) GetMonitor() *iris.Application

func (*Server) OnErrorCode

func (s *Server) OnErrorCode(code int, onErr func(ctx iris.Context)) *Server

func (*Server) RegisterComponent

func (s *Server) RegisterComponent(component Component) *Server

func (*Server) RegisterComponents

func (s *Server) RegisterComponents(components ...Component) *Server

func (*Server) SetHomePage

func (s *Server) SetHomePage(indexHtml string) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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