remote

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFile = "config.json"

ConfigFile is the name of the config file.

View Source
const DotDir = ".multiverse"

DotDir is the dot directory for the remote.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Author contains published repositories.
	Author *object.Author `json:"author"`
	// HttpAddress is the http listener address.
	HttpAddress string `json:"http_address"`
	// ListenAddresses contains libp2p listener addresses.
	ListenAddresses []string `json:"listen_addresses"`
	// PrivateKey is the private key of the remote.
	PrivateKey string `json:"private_key"`
	// contains filtered or unexported fields
}

Config contains repository info.

func NewConfig

func NewConfig(root string) *Config

New returns a config with default settings.

func (*Config) Read

func (c *Config) Read() error

Read reads the config from the path.

func (*Config) Write

func (c *Config) Write() error

Write writes the config to the path.

type Server

type Server struct {
	// Config contains server settings.
	Config *Config
	// Peer manages peer services.
	Peer *p2p.Peer
	// Namesys resolves named resources.
	Namesys *name.System
	// Resolover is an ipfs path resolver.
	Resolver *resolver.Resolver
	// Root is the server root path.
	Root string
}

Server implements the remote server.

func NewServer

func NewServer(ctx context.Context, home string) (*Server, error)

NewServer returns a new remote server.

Jump to

Keyboard shortcuts

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