Documentation ¶
Index ¶
Constants ¶
View Source
const ( DOCUMENT_NODE = "node" DOCUMENT_STACK = "stack" DOCUMENT_SERVICE = "service" DOCUMENT_TASK = "task" DOCUMENT_NETWORK = "network" DOCUMENT_VOLUME = "volume" )
View Source
const (
//Search
CodeInvalidSearchKeywords = "503-13001"
)
View Source
const (
RESULT_LEN = 10
)
View Source
const SEARCH_LOAD_DATA_INTERVAL = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CraneIndexer ¶
type CraneIndexer struct { Indexer CraneDockerClient *dockerclient.CraneDockerClient }
func NewCraneIndex ¶
func NewCraneIndex(CraneDockerClient *dockerclient.CraneDockerClient) *CraneIndexer
func (*CraneIndexer) Index ¶
func (indexer *CraneIndexer) Index(store *DocumentStorage)
type DocumentStorage ¶
func NewDocumentStorage ¶
func NewDocumentStorage() *DocumentStorage
func (*DocumentStorage) Copy ¶
func (storage *DocumentStorage) Copy() *DocumentStorage
func (*DocumentStorage) Empty ¶
func (storage *DocumentStorage) Empty()
func (*DocumentStorage) Get ¶
func (storage *DocumentStorage) Get(key string) *Document
func (*DocumentStorage) Indices ¶
func (storage *DocumentStorage) Indices() []string
func (*DocumentStorage) Set ¶
func (storage *DocumentStorage) Set(key string, doc Document)
type Indexer ¶
type Indexer interface {
Index(prefetchStore *DocumentStorage)
}
type SearchApi ¶
type SearchApi struct { Index []string Store *DocumentStorage PrefetchStore *DocumentStorage Indexer Indexer }
func (*SearchApi) ApiRegister ¶
func (searchApi *SearchApi) ApiRegister(router *gin.Engine, middlewares ...gin.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.