server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package server contains the policy engine's server handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsWriteConflict

func IsWriteConflict(err error) bool

IsWriteConflict returns true if the error indicates write conflict.

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(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.

type WriteConflictError

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

WriteConflictError represents an error condition raised if the caller attempts to modify a virtual document or create a document at a path that conflicts with an existing document.

func (WriteConflictError) Error

func (err WriteConflictError) Error() string

Jump to

Keyboard shortcuts

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