Documentation ¶
Overview ¶
generated by go-extpoints -- DO NOT EDIT
Index ¶
- Variables
- func Register(component interface{}, name string) []string
- func Unregister(name string) []string
- type AdapterFactory
- type AdapterTransport
- type HttpHandler
- type Job
- type LogAdapter
- type LogRouter
- type LogsPump
- type Message
- type Route
- func (r *Route) AdapterTransport(dfault string) string
- func (r *Route) AdapterType() string
- func (r *Route) Close()
- func (r *Route) Closer() <-chan bool
- func (r *Route) MatchContainer(id, name string, labels map[string]string) bool
- func (r *Route) MatchMessage(message *Message) bool
- func (r *Route) MultiContainer() bool
- func (r *Route) OverrideCloser(closer <-chan bool)
- type RouteFileStore
- type RouteManager
- func (rm *RouteManager) Add(route *Route) error
- func (rm *RouteManager) AddFromURI(uri string) error
- func (rm *RouteManager) Get(id string) (*Route, error)
- func (rm *RouteManager) GetAll() ([]*Route, error)
- func (rm *RouteManager) Load(persistor RouteStore) error
- func (rm *RouteManager) Name() string
- func (rm *RouteManager) Remove(id string) bool
- func (rm *RouteManager) Route(route *Route, logstream chan *Message)
- func (rm *RouteManager) RoutingFrom(containerID string) bool
- func (rm *RouteManager) Run() error
- func (rm *RouteManager) Setup() error
- type RouteStore
Constants ¶
This section is empty.
Variables ¶
var AdapterFactories = &adapterFactoryExt{ newExtensionPoint(new(AdapterFactory)), }
var AdapterTransports = &adapterTransportExt{ newExtensionPoint(new(AdapterTransport)), }
var HttpHandlers = &httpHandlerExt{ newExtensionPoint(new(HttpHandler)), }
var Jobs = &jobExt{ newExtensionPoint(new(Job)), }
var LogRouters = &logRouterExt{ newExtensionPoint(new(LogRouter)), }
Functions ¶
func Unregister ¶
Types ¶
type AdapterFactory ¶
type AdapterFactory func(route *Route) (LogAdapter, error)
AdapterFactory is an extension type for adding new log adapters
type AdapterTransport ¶
AdapterTransport is an extension type for connection transports used by adapters
type HttpHandler ¶
HttpHandler is an extension type for adding HTTP endpoints
type LogAdapter ¶
type LogAdapter interface {
Stream(logstream chan *Message)
}
LogAdapter is a streamed log
type LogRouter ¶
type LogRouter interface { RoutingFrom(containerID string) bool Route(route *Route, logstream chan *Message) }
LogRouter sends logs to LogAdapters via Routes
type LogsPump ¶
type LogsPump struct {
// contains filtered or unexported fields
}
LogsPump is responsible for "pumping" logs to their configured destinations
func (*LogsPump) RoutingFrom ¶
RoutingFrom returns whether a container id is routing from this pump
type Route ¶
type Route struct { ID string `json:"id"` FilterID string `json:"filter_id,omitempty"` FilterName string `json:"filter_name,omitempty"` FilterSources []string `json:"filter_sources,omitempty"` FilterLabels []string `json:"filter_labels,omitempty"` Adapter string `json:"adapter"` Address string `json:"address"` Options map[string]string `json:"options,omitempty"` // contains filtered or unexported fields }
Route represents what subset of logs should go where
func (*Route) AdapterTransport ¶
AdapterTransport returns a route's adapter transport string
func (*Route) AdapterType ¶
AdapterType returns a route's adapter type string
func (*Route) MatchContainer ¶
MatchContainer returns whether the Route is responsible for a given container
func (*Route) MatchMessage ¶
MatchMessage returns whether the Route is responsible for a given Message
func (*Route) MultiContainer ¶
MultiContainer returns whether the Route is matching multiple containers or not
func (*Route) OverrideCloser ¶
OverrideCloser sets a Route.closer to closer
type RouteFileStore ¶
type RouteFileStore string
RouteFileStore represents a directory for storing routes
func (RouteFileStore) Add ¶
func (fs RouteFileStore) Add(route *Route) error
Add writes a marshalled *Route to the RouteFileStore
func (RouteFileStore) Filename ¶
func (fs RouteFileStore) Filename(id string) string
Filename returns the filename in a RouteFileStore for a given id
func (RouteFileStore) Get ¶
func (fs RouteFileStore) Get(id string) (*Route, error)
Get returns *Route based on an id
func (RouteFileStore) GetAll ¶
func (fs RouteFileStore) GetAll() ([]*Route, error)
GetAll returns a slice of *Route for the entire RouteFileStore
func (RouteFileStore) Remove ¶
func (fs RouteFileStore) Remove(id string) bool
Remove removes route from the RouteFileStore based on id
type RouteManager ¶
RouteManager is responsible for maintaining route state
var Routes *RouteManager
Routes is all the configured routes
func (*RouteManager) Add ¶
func (rm *RouteManager) Add(route *Route) error
Add adds a route to the RouteManager
func (*RouteManager) AddFromURI ¶
func (rm *RouteManager) AddFromURI(uri string) error
AddFromURI creates a new route from an URI string and adds it to the RouteManager
func (*RouteManager) Get ¶
func (rm *RouteManager) Get(id string) (*Route, error)
Get returns a Route based on id
func (*RouteManager) GetAll ¶
func (rm *RouteManager) GetAll() ([]*Route, error)
GetAll returns all routes in the RouteManager
func (*RouteManager) Load ¶
func (rm *RouteManager) Load(persistor RouteStore) error
Load loads all route from a RouteStore
func (*RouteManager) Name ¶
func (rm *RouteManager) Name() string
Name returns the name of the RouteManager
func (*RouteManager) Remove ¶
func (rm *RouteManager) Remove(id string) bool
Remove removes a route from a RouteManager based on id
func (*RouteManager) Route ¶
func (rm *RouteManager) Route(route *Route, logstream chan *Message)
Route takes a logstream and route and passes them off to all configure LogRouters
func (*RouteManager) RoutingFrom ¶
func (rm *RouteManager) RoutingFrom(containerID string) bool
RoutingFrom returns whether a given container is routing through the RouteManager
func (*RouteManager) Setup ¶
func (rm *RouteManager) Setup() error
Setup configures the RouteManager