api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Db       string
	Port     int
	Replicas int
	Volumes  []string
}

type File

type File struct {
	Name  string
	Type  string
	Mtime string
}

type ListResponse

type ListResponse struct {
	Next string   `json:"next"`
	Keys []string `json:"keys"`
}

type RebalanceRequest

type RebalanceRequest struct {
	Key  []byte
	From []string
	To   []string
}

type RebuildRequest

type RebuildRequest struct {
	Key    []byte
	Volume string
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) (*Server, error)

func (*Server) Rebalance

func (s *Server) Rebalance()

func (*Server) Rebuild

func (s *Server) Rebuild()

func (*Server) Run

func (s *Server) Run()

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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