talks: golang.org/x/talks/2016/applicative/google Index | Files

package google

import "golang.org/x/talks/2016/applicative/google"

Index

Package Files

fake.go first.go parallel.go serial.go timeout.go

Variables

var (
    Web   = FakeSearch("web", "The Go Programming Language", "http://golang.org")
    Image = FakeSearch("image", "The Go gopher", "https://blog.golang.org/gopher/gopher.png")
    Video = FakeSearch("video", "Concurrency is not Parallelism", "https://www.youtube.com/watch?v=cN_DpYBzKso")
)

START2 OMIT

var (
    Web1   = FakeSearch("web1", "The Go Programming Language", "http://golang.org")
    Web2   = FakeSearch("web2", "The Go Programming Language", "http://golang.org")
    Image1 = FakeSearch("image1", "The Go gopher", "https://blog.golang.org/gopher/gopher.png")
    Image2 = FakeSearch("image2", "The Go gopher", "https://blog.golang.org/gopher/gopher.png")
    Video1 = FakeSearch("video1", "Concurrency is not Parallelism",
        "https://www.youtube.com/watch?v=cN_DpYBzKso")
    Video2 = FakeSearch("video2", "Concurrency is not Parallelism",
        "https://www.youtube.com/watch?v=cN_DpYBzKso")
)
func Search(query string) ([]Result, error)

func SearchParallel Uses

func SearchParallel(query string) ([]Result, error)

func SearchReplicated Uses

func SearchReplicated(query string, timeout time.Duration) ([]Result, error)

func SearchTimeout Uses

func SearchTimeout(query string, timeout time.Duration) ([]Result, error)

type Result Uses

type Result struct {
    Title, URL string
}

START1 OMIT

func (Result) String Uses

func (r Result) String() string

String returns the result's title, followed by a newline.

type SearchFunc Uses

type SearchFunc func(query string) Result // HL

func FakeSearch Uses

func FakeSearch(kind, title, url string) SearchFunc

func First Uses

func First(replicas ...SearchFunc) SearchFunc

Package google imports 4 packages (graph) and is imported by 1 packages. Updated 2017-07-21. Refresh now. Tools for package owners.