handler

package
v0.20.14 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT 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 rr.Router
}

Router implements router handler

func (*Router) Advertise

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

Advertise streams router advertisements

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

Process processes advertisements

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 rr.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