api

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(addr string, dtClient *dtrack.Client, auditor audit.Auditor, logger zerolog.Logger) (*Server, error)

func (Server) AuditResultChan

func (s Server) AuditResultChan() <-chan any

AuditResultChan returns the server's channel for audit results.

func (Server) OPAStatusChan

func (s Server) OPAStatusChan() <-chan opa.Status

OPAStatusChan returns the server's channel for OPA status updates.

func (Server) ServeHTTP

func (s Server) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface.

func (Server) Start

func (s Server) Start() error

Start starts the server and blocks until it is stopped. Once stopped, all channels created by the server are closed. A server instance can thus not be restarted (although we don't explicitly prevent that right now).

func (Server) Stop

func (s Server) Stop() error

Stop shuts the server down.

Jump to

Keyboard shortcuts

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