lessdisk

package
v0.0.0-...-c3c44a6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataSize = errors.New("data size err")
)

Functions

This section is empty.

Types

type ChainOperator

type ChainOperator interface {
	CurrentHeader() *types.Header
	DelLocalBlocks(blocks []*mc.BlockInfo) (fails []*mc.BlockInfo, err error)
}

type DatabaseOperator

type DatabaseOperator interface {
	Has(key []byte) (bool, error)
	Get(key []byte) ([]byte, error)
	Put(key []byte, value []byte) error
	Delete(key []byte) error
}

type Server

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

func NewLessDiskSvr

func NewLessDiskSvr(config *params.LessDiskConfig, db DatabaseOperator, chain ChainOperator) *Server

func (*Server) FuncSwitch

func (self *Server) FuncSwitch(enable bool)

func (*Server) Stop

func (self *Server) Stop()

Jump to

Keyboard shortcuts

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