store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package store abstracts access to zero config zones.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachingFetcher

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

CachingFetcher is a simple stupid in memory cache that unconditionally returns cached zones and triggers a cache update in the background.

func NewCachingFetcher

func NewCachingFetcher(fetcher Fetcher) *CachingFetcher

NewCachingFetcher creates a new caching fetcher

func (*CachingFetcher) FetchZone

func (f *CachingFetcher) FetchZone(id string) (*model.Zone, error)

type Fetcher

type Fetcher interface {
	FetchZone(id string) (*model.Zone, error)
}

A Fetcher knows how to fetch a zone.

type IPNSFetcher

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

IPNSFetcher knows how to fetch zones from IPNS.

func NewIPNSFetcher

func NewIPNSFetcher(apiAddr string) *IPNSFetcher

NewIPNSFetcher returns a new IPNSFetcher.

func (*IPNSFetcher) FetchZone

func (f *IPNSFetcher) FetchZone(id string) (*model.Zone, error)

type IPNSGatewayFetcher

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

IPNSGatewayFetcher fetches a zone using the ipfs gateway

func NewIPNSGatewayFetcher

func NewIPNSGatewayFetcher(gwAddr string) *IPNSGatewayFetcher

NewIPNSGatewayFetcher returns a new IPNSGatewayFetcher.

func (*IPNSGatewayFetcher) FetchZone

func (f *IPNSGatewayFetcher) FetchZone(id string) (*model.Zone, error)

type SingleFlightFetcher

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

func NewSingleFlightFetcher

func NewSingleFlightFetcher(fetcher Fetcher) *SingleFlightFetcher

NewSingleFlightFetcher creates a new single flight fetcher.

func (*SingleFlightFetcher) FetchZone

func (f *SingleFlightFetcher) FetchZone(id string) (*model.Zone, error)

Jump to

Keyboard shortcuts

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