urltrack

package
v0.0.0-...-b292b7d Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient *http.Client

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(string, []byte)

type Rule

type Rule struct {
	Url           string
	CheckInterval time.Duration
	CallBack      CallbackFunc
	// contains filtered or unexported fields
}

func (*Rule) Do

func (rule *Rule) Do()

func (*Rule) Run

func (rule *Rule) Run()

type Service

type Service struct {
	Client        *http.Client
	CheckInterval time.Duration
	// contains filtered or unexported fields
}

func New

func New(rules []Rule, interval time.Duration, cb CallbackFunc) (*Service, error)

func NewWithCommonInterval

func NewWithCommonInterval(urls []string, interval time.Duration,
	cb CallbackFunc) (*Service, error)

func (*Service) AddUrl

func (s *Service) AddUrl(u string) error

func (*Service) Get

func (s *Service) Get(url string) ([]byte, error)

func (*Service) NewRule

func (s *Service) NewRule(rule Rule) *Rule

func (*Service) Run

func (s *Service) Run()

func (*Service) Send

func (s *Service) Send(rule Rule)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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