Documentation ¶
Index ¶
- Constants
- func ETag() bool
- func SetETag(b bool)
- type Fetcher
- func (f *Fetcher[V]) Close() error
- func (f *Fetcher[V]) Initial() (V, error)
- func (f *Fetcher[V]) Name() string
- func (f *Fetcher[V]) SideUpdate(buf []byte) (V, bool, error)
- func (f *Fetcher[V]) Update() (V, bool, error)
- func (f *Fetcher[V]) UpdatedAt() time.Time
- func (f *Fetcher[V]) Vehicle() types.Vehicle
- func (f *Fetcher[V]) VehicleType() types.VehicleType
- type FileVehicle
- func (f *FileVehicle) Path() string
- func (f *FileVehicle) Proxy() string
- func (f *FileVehicle) Read(ctx context.Context, oldHash utils.HashType) (buf []byte, hash utils.HashType, err error)
- func (f *FileVehicle) Type() types.VehicleType
- func (f *FileVehicle) Url() string
- func (f *FileVehicle) Write(buf []byte) error
- type HTTPVehicle
- func (h *HTTPVehicle) Path() string
- func (h *HTTPVehicle) Proxy() string
- func (h *HTTPVehicle) Read(ctx context.Context, oldHash utils.HashType) (buf []byte, hash utils.HashType, err error)
- func (h *HTTPVehicle) SetProvider(provider types.ProxyProvider)
- func (h *HTTPVehicle) Type() types.VehicleType
- func (h *HTTPVehicle) Url() string
- func (h *HTTPVehicle) Write(buf []byte) error
- type Parser
Constants ¶
View Source
const (
DefaultHttpTimeout = time.Second * 20
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fetcher ¶
type Fetcher[V any] struct { // contains filtered or unexported fields }
func NewFetcher ¶
func (*Fetcher[V]) SideUpdate ¶ added in v1.18.8
func (*Fetcher[V]) VehicleType ¶
func (f *Fetcher[V]) VehicleType() types.VehicleType
type FileVehicle ¶
type FileVehicle struct {
// contains filtered or unexported fields
}
func NewFileVehicle ¶
func NewFileVehicle(path string) *FileVehicle
func (*FileVehicle) Path ¶
func (f *FileVehicle) Path() string
func (*FileVehicle) Proxy ¶ added in v1.18.4
func (f *FileVehicle) Proxy() string
func (*FileVehicle) Type ¶
func (f *FileVehicle) Type() types.VehicleType
func (*FileVehicle) Url ¶ added in v1.18.9
func (f *FileVehicle) Url() string
func (*FileVehicle) Write ¶ added in v1.18.9
func (f *FileVehicle) Write(buf []byte) error
type HTTPVehicle ¶
type HTTPVehicle struct {
// contains filtered or unexported fields
}
func NewHTTPVehicle ¶
func (*HTTPVehicle) Path ¶
func (h *HTTPVehicle) Path() string
func (*HTTPVehicle) Proxy ¶ added in v1.18.4
func (h *HTTPVehicle) Proxy() string
func (*HTTPVehicle) SetProvider ¶ added in v1.18.10
func (h *HTTPVehicle) SetProvider(provider types.ProxyProvider)
func (*HTTPVehicle) Type ¶
func (h *HTTPVehicle) Type() types.VehicleType
func (*HTTPVehicle) Url ¶
func (h *HTTPVehicle) Url() string
func (*HTTPVehicle) Write ¶ added in v1.18.9
func (h *HTTPVehicle) Write(buf []byte) error
Click to show internal directories.
Click to hide internal directories.