server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

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

	LDAPListenAddr string

	LDAPBaseDN                  string
	LDAPAllowLocalAnonymousBind bool

	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