package server

import "github.com/open-policy-agent/opa/server"

Package server contains the policy engine's server handlers.

Index

Constants

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

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.

Source Files

doc.go server.go types.go

Version
v0.4.4
Published
Feb 15, 2017
Platform
js/wasm
Imports
18 packages
Last checked
36 seconds ago

Tools for package owners.