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: 9 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 {
	Validate(session string) error
	SetConnection(host string) error
}

AuthService is an interface to meet the authentication needs

type Server

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

Server satisfies gRPC service interface requirements Queue

func New

func New(authService AuthService) *Server

New creates a gRPC server instance for API

func (*Server) Get

func (s *Server) Get(ctx context.Context, gr *queuepb.QueueGetRequest) (*queuepb.QueueGetReply, error)

Get retrieves an available URL and recursion depth for processing

func (*Server) Serve

func (s *Server) Serve(address string) error

Serve handles gRPC requests for service API

func (*Server) Submit

func (s *Server) Submit(ctx context.Context, sr *queuepb.QueueSubmitRequest) (*queuepb.QueueSubmitReply, error)

Submit handles client requests to Submit to the Queue service

Jump to

Keyboard shortcuts

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