metasource

package
v0.0.0-...-b2dbf94 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterHandlerMap

type ClusterHandlerMap struct {
	ClusterID string

	cache.HandlerMap
	// contains filtered or unexported fields
}

func (*ClusterHandlerMap) HandlerEvent

func (chm *ClusterHandlerMap) HandlerEvent(event *resource.ResourceEvent)

type MetaSource

type MetaSource struct {
	HandlerTemplateMap map[resource.ResType]resource.HandlerTemplate
	// clusterId(string) -> *cache.ClusterHandlerMap
	ClusterMaps sync.Map

	Exporter        resource.Exporter
	QuerierCacheMap cache.CacheMap
	HttpServer      *server.HTTPServer

	AgentLastCheckPoint *lru.Cache[int64, *resource.CheckPoint]
	AgentCounter        atomic.Int64
	// contains filtered or unexported fields
}

func NewMetaSource

func NewMetaSource() *MetaSource

func (*MetaSource) HandlePushedEvent

func (r *MetaSource) HandlePushedEvent(w http.ResponseWriter, req *http.Request)

func (*MetaSource) Handlers

func (r *MetaSource) Handlers() map[string]http.HandlerFunc

func (*MetaSource) Run

func (s *MetaSource) Run() error

func (*MetaSource) RunWithFetcher

func (r *MetaSource) RunWithFetcher(address string, resTypes ...resource.ResType) error

func (*MetaSource) Stop

func (s *MetaSource) Stop() error

func (*MetaSource) WithConfig

func (s *MetaSource) WithConfig(cfg *configs.MetaSourceConfig) *MetaSource

func (*MetaSource) WithExporter

func (s *MetaSource) WithExporter(exporter resource.Exporter) *MetaSource

func (*MetaSource) WithExporters

func (s *MetaSource) WithExporters(exporters ...resource.Exporter) *MetaSource

func (*MetaSource) WithHandlerTemp

func (s *MetaSource) WithHandlerTemp(resType resource.ResType, handler resource.HandlerTemplate) *MetaSource

func (*MetaSource) WithHttpServer

func (s *MetaSource) WithHttpServer(srv *server.HTTPServer) *MetaSource

func (*MetaSource) WithQuerier

func (s *MetaSource) WithQuerier(querier cache.CacheMap) *MetaSource

Jump to

Keyboard shortcuts

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