Documentation
¶
Index ¶
- Variables
- func ExtractBatchSize(query url.Values, maxBatchSize int) (int, error)
- func GetOutputLabelFromRef(ctx context.Context, label *api.Label, ref *DataRef, log *zap.Logger) (*api.Label, error)
- func HandleDeleteOutputLabel(labelStore labelstore.LabelStore, log *zap.Logger) http.HandlerFunc
- func HandleGetMetadata(metadata *metadata.Metadata, log *zap.Logger) http.HandlerFunc
- func HandleGetOutputDataFromRef(gadgetID string, ref *DataRef, log *zap.Logger) http.HandlerFunc
- func HandleGetOutputLabel(labelStore labelstore.LabelStore, ref *DataRef, log *zap.Logger) http.HandlerFunc
- func HandleGetOutputLabelFromRef(ref *DataRef, log *zap.Logger) http.HandlerFunc
- func HandleInputState(channels map[string]*DataRef, log *zap.Logger) http.HandlerFunc
- func HandleOutputLabel(labelStore labelstore.LabelStore, ref *DataRef, ...) http.HandlerFunc
- func HandlePutOutputLabel(labelStore labelstore.LabelStore, payloadValidator PayloadValidator, ...) http.HandlerFunc
- func HandleSampleOutputLabelsFromRef(ref *DataRef, log *zap.Logger) http.HandlerFunc
- func HandleSampleOutputLabelsFromStore(labelStore labelstore.LabelStore, maxBatchSize int, log *zap.Logger) http.HandlerFunc
- func HandlerError(r *http.Request, w http.ResponseWriter, retCode int, err error, ...)
- func ResolveBaseURL(gadgetName string) string
- func SetupInputChannel(mux *mux.Router, gadgetID string, name string, ref *DataRef, log *zap.Logger)
- type DataRef
- type PayloadValidator
Constants ¶
This section is empty.
Variables ¶
var ErrLabelNotFound = errors.New("label not found")
var ErrNullDataRef = errors.New("null data ref")
Functions ¶
func ExtractBatchSize ¶
ExtractBatchSize extracts the batch size from the query string. If the batch size is not specified, the default batch size is used. If the batch size is too large, an error is returned.
func GetOutputLabelFromRef ¶
func HandleDeleteOutputLabel ¶
func HandleDeleteOutputLabel( labelStore labelstore.LabelStore, log *zap.Logger, ) http.HandlerFunc
HandleDeleteOutputLabel deletes a label from the output channel. deleterID is required as it is used to track who deleted the label.
func HandleGetMetadata ¶
func HandleGetOutputDataFromRef ¶
handleGetOutputDataFromRef returns the data associated with input label. This is a proxy method that calls the input gadget's /output/x without transforming the data in any way.
func HandleGetOutputLabel ¶
func HandleGetOutputLabel( labelStore labelstore.LabelStore, ref *DataRef, log *zap.Logger, ) http.HandlerFunc
HandleGetOutputLabel handler for retrieving a label from the output channel. The frontend invokes this to retrieve a specific label's metadata from the host gadget's underlying storage given its id.
func HandleGetOutputLabelFromRef ¶
func HandleGetOutputLabelFromRef( ref *DataRef, log *zap.Logger, ) http.HandlerFunc
HandleGetOutputLabelFromRef a handler that retrieves output labels from the referenced gadget
func HandleInputState ¶
func HandleOutputLabel ¶
func HandleOutputLabel( labelStore labelstore.LabelStore, ref *DataRef, payloadValidator PayloadValidator, log *zap.Logger, ) http.HandlerFunc
HandleOutputLabel samples labels from the output channel. This is gadget-specific as it requires querying the gadget's underlying storage.
func HandlePutOutputLabel ¶
func HandlePutOutputLabel( labelStore labelstore.LabelStore, payloadValidator PayloadValidator, log *zap.Logger, ) http.HandlerFunc
HandlePutOutputLabel handler for inserting a label into the output channel. The frontend invokes this to insert labels into the host gadget's underlying storage.
func HandleSampleOutputLabelsFromRef ¶
func HandleSampleOutputLabelsFromRef( ref *DataRef, log *zap.Logger, ) http.HandlerFunc
func HandleSampleOutputLabelsFromStore ¶
func HandleSampleOutputLabelsFromStore( labelStore labelstore.LabelStore, maxBatchSize int, log *zap.Logger, ) http.HandlerFunc
func HandlerError ¶
func ResolveBaseURL ¶
Types ¶
type DataRef ¶
type DataRef struct {
// contains filtered or unexported fields
}
func NewDataRef ¶
type PayloadValidator ¶
Source Files
¶
- dataref.go
- extract_batch_size.go
- get_output_label_from_ref.go
- handle_delete_output_label.go
- handle_get_metadata.go
- handle_get_output_data_from_ref.go
- handle_get_output_label.go
- handle_get_output_labels_from_ref.go
- handle_input_state.go
- handle_output_label.go
- handle_put_label_to_store.go
- handle_sample_output_labels.go
- handle_sample_output_labels_from_ref.go
- handler_error.go
- resolve.go
- setup_input_channel.go