Documentation ¶
Overview ¶
Copyright 2021 Yahoo.
Licensed 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.
Copyright 2021 Yahoo.
Licensed 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.
Copyright 2021 Yahoo.
Licensed 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.
Copyright 2021 Yahoo.
Licensed 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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pool ¶
type Pool struct { Name string PoolSize int FeatureEnabled bool PKCS11Timeout time.Duration // contains filtered or unexported fields }
Pool is a struct which holds information about the workers & queue for the job.
type Worker ¶
type Worker struct { ID int // ID is a unique id for the worker Priority proto.Priority // Priority indicates the priority of the request the worker is handling. PKCS11Timeout time.Duration // PKCS11Timeout is the max time a worker can wait to get signer from pool. TotalProcessed Counter // TotalProcessed indicates the total requests processed per priority by this worker. TotalTimeout Counter // TotalTimeout indicates the total requests that timed out before worker could process it. Quit chan struct{} // Quit is a channel to cancel the worker }
Worker struct stores worker information including worker id, priority & workerQ for indicating if the worker is idle or not.