Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessorService ¶
type AccessorService interface { HostToProxyServer(host string) (domain.ProxyServer, bool) DefaultServer() (domain.ProxyServer, bool) Find(name string) (domain.ProxyServer, bool) Servers() domain.ProxyServers }
AccessorService provides methods to access proxy servers
type ManagerService ¶
type ManagerService interface { Save(domain.ProxyServer) (domain.ProxyServer, error) Remove(ID int64) bool }
ManagerService provides methods to manage proxy servers
type Service ¶
type Service interface { ManagerService AccessorService }
Service provides methods for proxy servers
func NewService ¶
func NewService(logger *zerolog.Logger, servers domain.ProxyServers) Service
NewService created new server service instance
type Storage ¶
type Storage interface { GetAll() domain.ProxyServers GetServer(ID int64) (domain.ProxyServer, bool) Save(domain.ProxyServer) (domain.ProxyServer, error) Remove(ID int64) bool }
Storage provides storage for servers
func NewStorage ¶
func NewStorage(logger *zerolog.Logger, servers domain.ProxyServers, storageSize int, storageDuration time.Duration) Storage
NewStorage creates new instance of server storage using in memory cache as storage backend
Click to show internal directories.
Click to hide internal directories.