api

package
v0.0.0-...-e36a8a6 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxFileSize = 1 * 1024 * 1024
	DefaultMaxPackSize = 10 * 1024 * 1024
)

Variables

This section is empty.

Functions

func NewGitHandler

func NewGitHandler(
	path string,
	rdb Storage,
	node raft.Node,
	logger logging.Logger,
	opts ...Options,
) *httpGitAPI

func NewHandler

func NewHandler(db Storage, raft raft.Node) http.Handler

serveHttpKVAPI starts a key-value server with a GET/PUT API and listens.

Types

type Options

type Options func(h *httpGitAPI)

func WithLimitSize

func WithLimitSize(maxFileSize, maxPackSize int64) Options

type Service

type Service int
const (
	Service_Invalid Service = iota
	Service_UploadPack
	Service_ReceivePack
)

type Storage

type Storage interface {
	Snapshot() (pb.Snapshot, error)
	GetAllRefs() (map[string]refs.Hash, error)
}

Jump to

Keyboard shortcuts

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