service

package
v0.9.20 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemCache

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

func NewMemCache

func NewMemCache() *MemCache

func (*MemCache) CleanupStaleProxies added in v0.9.6

func (c *MemCache) CleanupStaleProxies(threshold time.Duration)

func (*MemCache) GetAllProxies added in v0.2.0

func (c *MemCache) GetAllProxies() []proxyinabox.Proxy

func (*MemCache) GetProxy

func (c *MemCache) GetProxy() (string, bool)

func (*MemCache) HasProxy

func (c *MemCache) HasProxy(proxy string) bool

func (*MemCache) IsIPLocked added in v0.9.6

func (c *MemCache) IsIPLocked(ip string) bool

func (*MemCache) LoadLockedIPs added in v0.9.6

func (c *MemCache) LoadLockedIPs()

func (*MemCache) MarkVerifyFailed added in v0.9.6

func (c *MemCache) MarkVerifyFailed(p proxyinabox.Proxy)

func (*MemCache) MarkVerifySuccess added in v0.9.6

func (c *MemCache) MarkVerifySuccess(p proxyinabox.Proxy, delay int64, verifyTime time.Time)

func (*MemCache) PickProxy

func (c *MemCache) PickProxy(req *http.Request) (string, error)

func (*MemCache) ProxyLength

func (c *MemCache) ProxyLength() int

func (*MemCache) RandomProxy

func (c *MemCache) RandomProxy() (string, bool)

func (*MemCache) RecordFailure added in v0.9.6

func (c *MemCache) RecordFailure(ip string) bool

func (*MemCache) UpsertProxy added in v0.9.6

func (c *MemCache) UpsertProxy(p proxyinabox.Proxy) error

type ProxyService

type ProxyService struct {
	DB *gorm.DB
}

ProxyService mysql proxy service

func (*ProxyService) GetUnVerified

func (ps *ProxyService) GetUnVerified() (p []proxyinabox.Proxy, e error)

GetUnVerified get un verified proxies

Jump to

Keyboard shortcuts

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