plug_astore

package
v0.0.0-...-060dca9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StoragePlugins = make(map[string]StoragePlugin)

Functions

func NormToNative

func NormToNative(s string) string

Types

type Config

type Config struct {
	Storage     []Storage `inn:"@storage"`
	Network     Network   `inn:"$network"`
	Authorative string    `inn:"$topology"`
}

type Network

type Network struct {
	Addr string `inn:"$ip-addr"`
	Node string `inn:"$node"`

	MLType string `inn:"$gossip-type"`
	Gossip int    `inn:"$gossip-port"`
	N2n    int    `inn:"$n2n-port"`
	Srv    int    `inn:"$srv-port"`

	Join []string `inn:"@join"`
}

type Service

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

func (*Service) Init

func (s *Service) Init(n *Network, authorative string) error

func (*Service) Init2

func (s *Service) Init2(config []byte) error

func (*Service) Instantiate

func (s *Service) Instantiate(stors []Storage)

func (*Service) Start

func (s *Service) Start(n *Network) error

func (*Service) Wait

func (s *Service) Wait() error

type Storage

type Storage struct {
	Type         string           `inn:"$storage"`
	MaxSize      datatypes.Number `inn:"$max-size"`
	MaxFiles     datatypes.Number `inn:"$max-files"`
	MaxDayOffset int              `inn:"$max-day-offset"`
	Location     string           `inn:"$location"`
	Ring         string           `inn:"$ring"`
	Shard        string           `inn:"$shard"`
}

type StoragePlugin

type StoragePlugin func(s *Storage) (articlestore.Storage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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