Documentation
¶
Overview ¶
Package front implements frontend service.
Index ¶
- func NewHandler(baseCtx context.Context, clientConstructor NodeClientConstructor, ...) (http.Handler, error)
- type Chunk
- type ChunksNotFound
- type DefaultNodeClientConstructor
- type File
- type FileNotFoundErr
- type Handler
- type HandlerStorage
- type LimitReaderFrom
- type Node
- type NodeClient
- type NodeClientConstructor
- type NodeStat
- type YDBStorage
- func (y YDBStorage) AddFile(ctx context.Context, file File) error
- func (y YDBStorage) AddNode(ctx context.Context, node Node) error
- func (y YDBStorage) CreateTables(ctx context.Context) error
- func (y YDBStorage) File(ctx context.Context, name string) (*File, error)
- func (y YDBStorage) NodeStats(ctx context.Context) ([]NodeStat, error)
- func (y YDBStorage) Nodes(ctx context.Context) ([]Node, error)
- func (y YDBStorage) RemoveFile(ctx context.Context, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler( baseCtx context.Context, clientConstructor NodeClientConstructor, storage HandlerStorage, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, ) (http.Handler, error)
Types ¶
type ChunksNotFound ¶
type ChunksNotFound struct {
File string
}
func (*ChunksNotFound) Error ¶
func (e *ChunksNotFound) Error() string
type DefaultNodeClientConstructor ¶
type DefaultNodeClientConstructor struct {
HTTPClient node.HTTPClient
TracerProvider trace.TracerProvider
}
func NewDefaultNodeClientConstructor ¶
func NewDefaultNodeClientConstructor(httpClient node.HTTPClient, tracerProvider trace.TracerProvider) *DefaultNodeClientConstructor
func (*DefaultNodeClientConstructor) NewClient ¶
func (c *DefaultNodeClientConstructor) NewClient(baseURL string) NodeClient
type FileNotFoundErr ¶
type FileNotFoundErr struct {
File string
}
func (*FileNotFoundErr) Error ¶
func (e *FileNotFoundErr) Error() string
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) GetClient ¶
func (h *Handler) GetClient(baseURL string) NodeClient
GetClient creates or returns existing client to baseURL.
func (*Handler) NextClients ¶
NextClients returns next N clients with least amount of data.
type HandlerStorage ¶
type HandlerStorage interface {
File(ctx context.Context, name string) (*File, error)
AddFile(ctx context.Context, file File) error
RemoveFile(ctx context.Context, name string) error
Nodes(ctx context.Context) ([]Node, error)
NodeStats(ctx context.Context) ([]NodeStat, error)
AddNode(ctx context.Context, node Node) error
}
type LimitReaderFrom ¶
LimitReaderFrom is a reader that reads from R at Offset but stops with EOF after N bytes.
type NodeClient ¶
type NodeClientConstructor ¶
type NodeClientConstructor interface {
NewClient(baseURL string) NodeClient
}
type YDBStorage ¶
type YDBStorage struct {
// contains filtered or unexported fields
}
func NewYDBStorage ¶
func NewYDBStorage(db *ydb.Driver, tracer trace.Tracer) *YDBStorage
func (YDBStorage) CreateTables ¶
func (y YDBStorage) CreateTables(ctx context.Context) error
func (YDBStorage) NodeStats ¶
func (y YDBStorage) NodeStats(ctx context.Context) ([]NodeStat, error)
func (YDBStorage) RemoveFile ¶
func (y YDBStorage) RemoveFile(ctx context.Context, name string) error
Click to show internal directories.
Click to hide internal directories.