serverutil

package
v1.8.12 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: GPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v1.8.7

type Controller interface {
	ListenAndServe()
	Close()
}

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

func NewController added in v1.8.7

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

NewController return simple server controller.

type Protocol added in v1.8.7

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 added in v1.8.7

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

ServerErrorLogger implements go-imap/logger interface.

func NewServerErrorLogger added in v1.8.7

func NewServerErrorLogger(protocol Protocol) *ServerErrorLogger

func (*ServerErrorLogger) Printf added in v1.8.7

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

func (*ServerErrorLogger) Println added in v1.8.7

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