api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init set api discovery local_memory service.

func InitAPIsFromConfig

func InitAPIsFromConfig(apiConfig config.APIConfig) error

InitAPIsFromConfig inits the router from API config and to local cache

func RefreshAPIsFromConfig added in v0.2.0

func RefreshAPIsFromConfig(apiConfig config.APIConfig) error

RefreshAPIsFromConfig fresh the router from API config and to local cache

Types

type LocalMemoryAPIDiscoveryService

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

LocalMemoryAPIDiscoveryService is the local cached API discovery service

func NewLocalMemoryAPIDiscoveryService

func NewLocalMemoryAPIDiscoveryService() *LocalMemoryAPIDiscoveryService

NewLocalMemoryAPIDiscoveryService creates a new LocalMemoryApiDiscoveryService instance

func (*LocalMemoryAPIDiscoveryService) APIConfigChange added in v0.2.0

func (ads *LocalMemoryAPIDiscoveryService) APIConfigChange(apiConfig config.APIConfig) bool

APIConfigChange to response to api config change

func (*LocalMemoryAPIDiscoveryService) AddAPI

func (ads *LocalMemoryAPIDiscoveryService) AddAPI(api fr.API) error

AddAPI adds a method to the router tree

func (*LocalMemoryAPIDiscoveryService) ClearAPI added in v0.2.0

func (ads *LocalMemoryAPIDiscoveryService) ClearAPI() error

ClearAPI clear all api

func (*LocalMemoryAPIDiscoveryService) GetAPI

func (ads *LocalMemoryAPIDiscoveryService) GetAPI(url string, httpVerb config.HTTPVerb) (fr.API, error)

GetAPI returns the method to the caller

Jump to

Keyboard shortcuts

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