Version: v0.0.0-...-6719cd2 Latest Latest

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 51 Imported by: 0



Package impl implements the external gRPC and HTTP API servers for Akutan.



This section is empty.


This section is empty.


This section is empty.


type Server

type Server struct {
	// contains filtered or unexported fields

Server is an implementation of the external gRPC & HTTP interfaces to Akutan

func New

func New(cfg *config.Akutan, src *viewclient.Client, aLog blog.AkutanLog) *Server

New returns a new instance of the API server, this exposes both an HTTP & gRPC API for consumers of the Akutan system to use. The returned Server instance will not start handling traffic until a subsequent call to Server.Run()

func (*Server) Insert

func (s *Server) Insert(ctx context.Context, req *api.InsertRequest) (*api.InsertResult, error)

Insert implements the gRPC method of the FactStore service.

func (*Server) LookupPo

func (s *Server) LookupPo(ctx context.Context, req *api.LookupPORequest) (*api.LookupPOResult, error)

LookupPo returns facts with matching predicate & object values

func (*Server) LookupSp

func (s *Server) LookupSp(ctx context.Context, req *api.LookupSPRequest) (*api.LookupSPResult, error)

LookupSp returns facts containing the supplied subject,predicate

func (*Server) Query

func (s *Server) Query(req *api.QueryRequest, res api.FactStore_QueryServer) error

Query implements the query method in the FactStore gRPC interface

func (*Server) QueryFacts

QueryFacts implements a streaming api for executing queries against the view store.

func (*Server) Run

func (s *Server) Run() error

Run will start listening for gRPC & HTTP requests. This function will block until the server is shutdown.

func (*Server) Wipe

func (s *Server) Wipe(ctx context.Context, w *api.WipeRequest) (*api.WipeResult, error)

Wipe implements the Wipe function in the FactStore gRPC API. If Wiping is enabled in the configuration this will delete all facts in the store. It is expected that this is only enabled in development environments. This blocks until all active views have processed the Wipe request.


Path Synopsis
Package kgstats fetches and caches runtime statistics about the cluster and dataset.
Package kgstats fetches and caches runtime statistics about the cluster and dataset.

Jump to

Keyboard shortcuts

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