server

package
v0.0.0-...-b224b64 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Authenticate(Username string, Password string) (session string, err error)
	SetConnection(host string) error
}

AuthService is an interface to meet the authentication needs

type QueueService

type QueueService interface {
	Submit(ctx context.Context, session string, url string, depth int, job string) error
	Get(ctx context.Context, session string) (url string, depth int, job string, err error)
	SetConnection(host string) error
}

QueueService is an interface to meet the queue needs

type Server

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

Server performs the retrieval from Queue and gets the URL contents

func New

func New(authService AuthService, queueService QueueService, storeService StoreService) *Server

New creates a gRPC server instance for Retriever

func (*Server) Run

func (s *Server) Run()

Run loops and processes the queue

func (*Server) Wait

func (s *Server) Wait()

Wait waits until the waitgroup is complete

type StoreService

type StoreService interface {
	Submit(ctx context.Context, session string, url string, urls []string) error
	SetConnection(host string) error
}

StoreService is an interface to meet the store needs

Jump to

Keyboard shortcuts

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