DB

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Route = "Route"
)
View Source
const (
	Service = "Service"
)
View Source
const (
	Upstream = "Upstream"
)

Variables

View Source
var DB *memdb.MemDB

Functions

func NewDB

func NewDB() (*memdb.MemDB, error)

Types

type RouteDB

type RouteDB struct {
	Routes []*v1.Route
}

func (*RouteDB) DeleteRoute

func (db *RouteDB) DeleteRoute() error

func (*RouteDB) Insert

func (db *RouteDB) Insert() error

InsertRoute insert route to memDB

func (*RouteDB) UpdateRoute

func (db *RouteDB) UpdateRoute() error

type RouteRequest

type RouteRequest struct {
	Group    string
	Name     string
	FullName string
}

func (*RouteRequest) FindByName

func (rr *RouteRequest) FindByName() (*v1.Route, error)

type ServiceDB

type ServiceDB struct {
	Services []*v1.Service
}

func (*ServiceDB) Insert

func (db *ServiceDB) Insert() error

func (*ServiceDB) UpdateService

func (db *ServiceDB) UpdateService() error

type ServiceRequest

type ServiceRequest struct {
	Group    string
	Name     string
	FullName string
}

func (*ServiceRequest) FindByName

func (sr *ServiceRequest) FindByName() (*v1.Service, error)

type UpstreamDB

type UpstreamDB struct {
	Upstreams []*v1.Upstream
}

func (*UpstreamDB) InsertUpstreams

func (upstreamDB *UpstreamDB) InsertUpstreams() error

insertUpstream insert upstream to memDB

func (*UpstreamDB) UpdateUpstreams

func (upstreamDB *UpstreamDB) UpdateUpstreams() error

type UpstreamRequest

type UpstreamRequest struct {
	Group    string
	Name     string
	FullName string
}

func (*UpstreamRequest) FindByName

func (ur *UpstreamRequest) FindByName() (*v1.Upstream, error)

Jump to

Keyboard shortcuts

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