Documentation ¶
Overview ¶
Package muxes has implementations of the Mux interface to route tables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegexTableMux ¶
type RegexTableMux struct {
// contains filtered or unexported fields
}
RegexTableMux provides a regex based router for table based on table names.
func NewRegexTableMux ¶
func NewRegexTableMux() *RegexTableMux
NewRegexTableMux creates a new default RegexTableMux.
func (*RegexTableMux) AcceptTable ¶
func (r *RegexTableMux) AcceptTable(ctx context.Context, metadata types.TableMetadata) (pxapi.TableRecordHandler, error)
AcceptTable implements the Muxer interface and is called when a new table is available.
func (*RegexTableMux) RegisterHandlerForPattern ¶
func (r *RegexTableMux) RegisterHandlerForPattern(pattern string, handlerFunc TableRecordHandlerFunc) error
RegisterHandlerForPattern registers a handler function that is called based on the passed in regex pattern. The patterns are handled in the order specified.
type TableRecordHandlerFunc ¶
type TableRecordHandlerFunc func(metadata types.TableMetadata) (pxapi.TableRecordHandler, error)
TableRecordHandlerFunc is called by the mux whenever a new table is streamed.
Click to show internal directories.
Click to hide internal directories.