Documentation ¶
Overview ¶
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func RunScanQueue(configPath string, stop <-chan struct{})
- func SetupHTTPServer(responder Responder)
- type Client
- type ClientInterface
- type Config
- type Job
- type JobResult
- type Metrics
- type Model
- func (model *Model) AddJob(job Job) error
- func (model *Model) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
- func (model *Model) GetModel() ([]byte, error)
- func (model *Model) GetNextJob() (interface{}, error)
- func (model *Model) NotFound(w http.ResponseWriter, r *http.Request)
- func (model *Model) PostFinishJob(jobResult JobResult) error
- type Responder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientInterface ¶
type ClientInterface interface { AddJob(key string, data interface{}) error GetNextJob(result interface{}) error PostFinishedJob(key string, jobErr error) error }
ClientInterface ...
type Model ¶
type Model struct { ScanQueue *util.PriorityQueue // contains filtered or unexported fields }
Model ...
func (*Model) GetNextJob ¶
GetNextJob returns nil if no job was found
func (*Model) NotFound ¶
func (model *Model) NotFound(w http.ResponseWriter, r *http.Request)
NotFound .....
func (*Model) PostFinishJob ¶
PostFinishJob ...
type Responder ¶
type Responder interface { GetModel() ([]byte, error) AddJob(job Job) error GetNextJob() (interface{}, error) PostFinishJob(result JobResult) error NotFound(w http.ResponseWriter, r *http.Request) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int) }
Responder .....