server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultGeneratedPasswordLength = 16

Variables

This section is empty.

Functions

func MustRegister

func MustRegister(reg prometheus.Registerer, cs ...prometheus.Collector)

MustRegister registers all rtm metrics with the provided registerer and panics upon the first registration that causes an error.

func NewLDAPServerCollector

func NewLDAPServerCollector(s *ldapserver.Server) prometheus.Collector

Types

type Config

type Config struct {
	Logger logrus.FieldLogger

	LDAPHandler string

	LDAPListenAddr  string
	LDAPSListenAddr string

	TLSCertFile string
	TLSKeyFile  string

	LDAPBaseDN  string
	LDAPAdminDN string

	LDAPAllowLocalAnonymousBind bool

	BoltDBFile string

	LDIFMain   string
	LDIFConfig string

	LDIFDefaultCompany    string
	LDIFDefaultMailDomain string
	LDIFTemplateExtraVars map[string]interface{}

	Metrics prometheus.Registerer

	OnReady func(*Server)
}

Config bundles server configuration settings.

type Server

type Server struct {
	LDAPServer  *ldapserver.Server
	LDAPHandler handler.Handler
	// contains filtered or unexported fields
}

Server is our server implementation.

func NewServer

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

NewServer constructs a server from the provided parameters.

func (*Server) Serve

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

Serve starts all the accociated servers resources and listeners and blocks forever until signals or error occurs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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