server

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package server contains the policy engine's server handlers.

Index

Constants

View Source
const (
	// ParamInputV1 defines the name of the HTTP URL parameter that specifies
	// values for the "input" document.
	ParamInputV1 = "input"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Handler http.Handler
	// contains filtered or unexported fields
}

Server represents an instance of OPA running in server mode.

func New

func New(ctx context.Context, store *storage.Storage, addr string, persist bool) (*Server, error)

New returns a new Server.

func (*Server) Compiler

func (s *Server) Compiler() *ast.Compiler

Compiler returns the server's compiler.

The server's compiler contains the compiled versions of all modules added to the server as well as data structures for performing query analysis. This is intended to allow services to embed the OPA server while still relying on the topdown package for query evaluation.

func (*Server) Loop

func (s *Server) Loop() error

Loop starts the server. This function does not return.

Jump to

Keyboard shortcuts

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