api

package
v0.0.0-...-8366d43 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerStopped       = errors.New("perm: the server has been stopped")
	ErrServerFailedToStart = errors.New("perm: the server failed to start")
)

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(opts ...ServerOption) *Server

func (*Server) GracefulStop

func (s *Server) GracefulStop()

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

func (*Server) Stop

func (s *Server) Stop()

type ServerOption

type ServerOption func(*serverConfig)

func WithDBConn

func WithDBConn(conn *sqlx.DB) ServerOption

func WithLogger

func WithLogger(logger logx.Logger) ServerOption

func WithMaxConnectionIdle

func WithMaxConnectionIdle(duration time.Duration) ServerOption

func WithOIDCProvider

func WithOIDCProvider(provider oidcx.Provider) ServerOption

func WithSecurityLogger

func WithSecurityLogger(logger logx.SecurityLogger) ServerOption

func WithStatter

func WithStatter(statter metrics.Statter) ServerOption

func WithTLSConfig

func WithTLSConfig(config *tls.Config) ServerOption

Directories

Path Synopsis
internal
repos/reposfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
rpc

Jump to

Keyboard shortcuts

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