package server
import "github.com/open-policy-agent/opa/server"
Package server contains the policy engine's server handlers.
Index ¶
- Constants
- func IsWriteConflict(err error) bool
- type Server
- func New(ctx context.Context, store *storage.Storage, addr string, persist bool) (*Server, error)
- func (s *Server) Compiler() *ast.Compiler
- func (s *Server) Loop() error
- type WriteConflictError
Constants ¶
const ( // ParamRequestV1 defines the name of the HTTP URL parameter that specifies // values for the "request" document. ParamRequestV1 = "request" )
Functions ¶
func IsWriteConflict ¶
IsWriteConflict returns true if the error indicates write conflict.
Types ¶
type Server ¶
Server represents an instance of OPA running in server mode.
func New ¶
New returns a new Server.
func (*Server) 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 ¶
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
Source Files ¶
- Version
- v0.3.1
- Published
- Dec 23, 2016
- Platform
- js/wasm
- Imports
- 18 packages
- Last checked
- 1 hour ago –
Tools for package owners.