backend

package
v0.1.48 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package backend contains some code for serving API endpoints (refer to the logrange/api package)

Index

Constants

View Source
const QueryMaxLimit = 10000
View Source
const QueryMaxWaitTimeout = 60

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Partitions *partition.Service `inject:""`
	MainCtx    context.Context    `inject:"mainCtx"`
	Streams    *pipe.Service      `inject:""`
	// contains filtered or unexported fields
}

Admin is a backend structure used by an api implementation

func NewAdmin

func NewAdmin() *Admin

func (*Admin) Execute

func (ad *Admin) Execute(req api.ExecRequest) (api.ExecResult, error)

Execute provides implementation of api.Admin.Execute() function

type Querier

type Querier struct {
	Journals    *partition.Service `inject:""`
	CurProvider cursor.Provider    `inject:""`
	// contains filtered or unexported fields
}

Querier is a backend structure used by an api implementation

func NewQuerier

func NewQuerier() *Querier

func (*Querier) Query

func (q *Querier) Query(ctx context.Context, req *api.QueryRequest) (*api.QueryResult, error)

Query allows to run query and receive a result. This is not optimized version, for streaming purposed api.rpc version must be used.

Jump to

Keyboard shortcuts

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