storage

package
v0.0.0-...-3404f59 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStorage

type IStorage interface {
	Save(proxy *model.Proxy) error
	Del(proxy *model.Proxy) bool
	Random(protocol rpc.Protocol) (*model.Proxy, error)
	All() []*model.Proxy
	Close() error
}

type MemoryStorage

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

func NewMemoryStorage

func NewMemoryStorage() *MemoryStorage

func (*MemoryStorage) All

func (m *MemoryStorage) All() []*model.Proxy

func (*MemoryStorage) Close

func (m *MemoryStorage) Close() error

func (*MemoryStorage) Del

func (m *MemoryStorage) Del(proxy *model.Proxy) bool

func (*MemoryStorage) Random

func (*MemoryStorage) Random(protocol rpc.Protocol) (*model.Proxy, error)

@TODO

func (*MemoryStorage) Save

func (m *MemoryStorage) Save(proxy *model.Proxy) error

Jump to

Keyboard shortcuts

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