handler

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	Router router.Router
}

Router implements router handler

func (*Router) Advertise

func (r *Router) Advertise(ctx context.Context, req *pb.Request, stream pb.Router_AdvertiseStream) error

func (*Router) Lookup

func (r *Router) Lookup(ctx context.Context, req *pb.LookupRequest, resp *pb.LookupResponse) error

Lookup looks up routes in the routing table and returns them

func (*Router) Process

func (r *Router) Process(ctx context.Context, req *pb.Advert, rsp *pb.ProcessResponse) error

func (*Router) Status

func (r *Router) Status(ctx context.Context, req *pb.Request, rsp *pb.StatusResponse) error

func (*Router) Watch

func (r *Router) Watch(ctx context.Context, req *pb.WatchRequest, stream pb.Router_WatchStream) error

Watch streans routing table events

type Table

type Table struct {
	Router router.Router
}

func (*Table) Create

func (t *Table) Create(ctx context.Context, route *pb.Route, resp *pb.CreateResponse) error

func (*Table) Delete

func (t *Table) Delete(ctx context.Context, route *pb.Route, resp *pb.DeleteResponse) error

func (*Table) List

func (t *Table) List(ctx context.Context, req *pb.Request, resp *pb.ListResponse) error

List returns all routes in the routing table

func (*Table) Query

func (t *Table) Query(ctx context.Context, req *pb.QueryRequest, resp *pb.QueryResponse) error

func (*Table) Update

func (t *Table) Update(ctx context.Context, route *pb.Route, resp *pb.UpdateResponse) error

Jump to

Keyboard shortcuts

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