Documentation
¶
Index ¶
- Constants
- type ImmuTc
- type ImmuTcServer
- func (s *ImmuTcServer) Start() (err error)
- func (s *ImmuTcServer) Stop()
- func (c *ImmuTcServer) WithChecker(checker ImmuTc) *ImmuTcServer
- func (c *ImmuTcServer) WithClient(client schema.ImmuServiceClient) *ImmuTcServer
- func (c *ImmuTcServer) WithLogger(logger logger.Logger) *ImmuTcServer
- func (c *ImmuTcServer) WithOptions(options Options) *ImmuTcServer
- func (c *ImmuTcServer) WithRootService(rootService client.RootService) *ImmuTcServer
- type MTLsOptions
- type Options
- func (o Options) Bind() string
- func (o Options) String() string
- func (o Options) WithAddress(address string) Options
- func (o Options) WithConfig(config string) Options
- func (o Options) WithDetached(detached bool) Options
- func (o Options) WithDir(dir string) Options
- func (o Options) WithImmudbAddress(immudbAddress string) Options
- func (o Options) WithImmudbPort(immudbPort int) Options
- func (o Options) WithLogfile(logfile string) Options
- func (o Options) WithMTLs(MTLs bool) Options
- func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options
- func (o Options) WithPidfile(pidfile string) Options
- func (o Options) WithPort(port int) Options
- type Service
Constants ¶
View Source
const ErrConsistencyFail = "consistency check fail at index %d"
ErrConsistencyFail happens when a consistency check fails. Check the log to retrieve details on which element is failing
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImmuTc ¶
type ImmuTc interface {
Start(context.Context) (err error)
Stop(context.Context)
GetStatus(context.Context) bool
}
ImmuTc trust checker interface
type ImmuTcServer ¶
type ImmuTcServer struct {
Options Options
Done chan bool
Quit chan os.Signal
HttpServer *http.Server
Checker ImmuTc
Logger logger.Logger
LogFile *os.File
RootService client.RootService
Pid server.PIDFile
Client schema.ImmuServiceClient
}
func DefaultServer ¶
func DefaultServer() *ImmuTcServer
func NewServer ¶
func NewServer(options Options) (immutcServer *ImmuTcServer, err error)
NewServer return a new trust checker server
func (*ImmuTcServer) Start ¶
func (s *ImmuTcServer) Start() (err error)
Start launch trust checker and status http server
func (*ImmuTcServer) Stop ¶
func (s *ImmuTcServer) Stop()
Stop shutdown trust checker and status http server
func (*ImmuTcServer) WithChecker ¶
func (c *ImmuTcServer) WithChecker(checker ImmuTc) *ImmuTcServer
func (*ImmuTcServer) WithClient ¶
func (c *ImmuTcServer) WithClient(client schema.ImmuServiceClient) *ImmuTcServer
func (*ImmuTcServer) WithLogger ¶
func (c *ImmuTcServer) WithLogger(logger logger.Logger) *ImmuTcServer
func (*ImmuTcServer) WithOptions ¶
func (c *ImmuTcServer) WithOptions(options Options) *ImmuTcServer
func (*ImmuTcServer) WithRootService ¶
func (c *ImmuTcServer) WithRootService(rootService client.RootService) *ImmuTcServer
type MTLsOptions ¶
func DefaultMTLsOptions ¶
func DefaultMTLsOptions() MTLsOptions
func (MTLsOptions) WithCertificate ¶
func (o MTLsOptions) WithCertificate(certificate string) MTLsOptions
func (MTLsOptions) WithClientCAs ¶
func (o MTLsOptions) WithClientCAs(clientCAs string) MTLsOptions
func (MTLsOptions) WithPkey ¶
func (o MTLsOptions) WithPkey(pkey string) MTLsOptions
func (MTLsOptions) WithServername ¶
func (o MTLsOptions) WithServername(servername string) MTLsOptions
type Options ¶
type Options struct {
Dir string
Address string
Port int
ImmudbAddress string
ImmudbPort int
Detached bool
MTLs bool
MTLsOptions client.MTLsOptions
Config string
Pidfile string
Logfile string
}
Options trust checker options
func (Options) WithAddress ¶
WithAddress sets address
func (Options) WithConfig ¶
WithConfig sets config
func (Options) WithDetached ¶
WithDetached sets immutc to be run in background
func (Options) WithImmudbAddress ¶
WithImmudbAddress sets immudbAddress
func (Options) WithImmudbPort ¶
WithImmudbPort sets immudbPort
func (Options) WithLogfile ¶
WithLogfile sets logfile
func (Options) WithMTLsOptions ¶
func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options
WithMTLsOptions sets MTLsOptions
func (Options) WithPidfile ¶
WithPidfile sets pidfile
Click to show internal directories.
Click to hide internal directories.