serverutil

package
v2.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP = Protocol("HTTP")
	IMAP = Protocol("IMAP")
	SMTP = Protocol("SMTP")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	ListenAndServe()
	Close()
}

Controller will make sure that server is listening and serving and if needed users are disconnected.

func NewController

func NewController(s Server, l listener.Listener) Controller

NewController return simple server controller.

type Protocol

type Protocol string

type Server

type Server interface {
	Protocol() Protocol
	UseSSL() bool
	Address() string
	TLSConfig() *tls.Config

	DebugServer() bool
	DebugClient() bool
	SetLoggers(localDebug, remoteDebug io.Writer)

	HandlePanic()
	DisconnectUser(string)
	Serve(net.Listener) error
	StopServe() error
}

Server can handle disconnected users.

type ServerErrorLogger

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

ServerErrorLogger implements go-imap/logger interface.

func NewServerErrorLogger

func NewServerErrorLogger(protocol Protocol) *ServerErrorLogger

func (*ServerErrorLogger) Printf

func (s *ServerErrorLogger) Printf(format string, args ...interface{})

func (*ServerErrorLogger) Println

func (s *ServerErrorLogger) Println(args ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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