Documentation
¶
Overview ¶
Package impl implements the external gRPC and HTTP API servers for Akutan.
Index ¶
- type Server
- func (s *Server) Insert(ctx context.Context, req *api.InsertRequest) (*api.InsertResult, error)
- func (s *Server) LookupPo(ctx context.Context, req *api.LookupPORequest) (*api.LookupPOResult, error)
- func (s *Server) LookupSp(ctx context.Context, req *api.LookupSPRequest) (*api.LookupSPResult, error)
- func (s *Server) Query(req *api.QueryRequest, res api.FactStore_QueryServer) error
- func (s *Server) QueryFacts(req *api.QueryFactsRequest, res api.FactStore_QueryFactsServer) error
- func (s *Server) Run() error
- func (s *Server) Wipe(ctx context.Context, w *api.WipeRequest) (*api.WipeResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an implementation of the external gRPC & HTTP interfaces to Akutan
func New ¶
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 ¶
func (s *Server) QueryFacts(req *api.QueryFactsRequest, res api.FactStore_QueryFactsServer) error
QueryFacts implements a streaming api for executing queries against the view store.
func (*Server) Run ¶
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.