mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00

In this initial commit the following checks are disabled due to excessive amount of changes required: - dupl (duplicate code) - funlen (function length) - goerr113 (errors handling expressions) - gomnd (magic numbers) - gosec (security) - nakedret (naked returns) - wsl (forces to use empty lines) - errcheck (checking for unchecked errors) - staticcheck (static analysis)
42 lines
1.6 KiB
Go
42 lines
1.6 KiB
Go
// Copyright 2019 Intel Corporation. All Rights Reserved.
|
|
//
|
|
// 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.
|
|
//
|
|
// +build linux
|
|
//
|
|
|
|
package bitstream
|
|
|
|
import "io"
|
|
|
|
// File defines interfaces that are common for all supported bitstream file formats
|
|
// It should provide mechanisms to get raw bitstream data as a reader or as a byte array
|
|
// as well as mechanisms to identify bitstreams.
|
|
type File interface {
|
|
io.Closer
|
|
// RawBitstreamReader returns Reader for raw bitstream data
|
|
RawBitstreamReader() io.ReadSeeker
|
|
// RawBitstreamData returns raw bitstream byte array
|
|
RawBitstreamData() ([]byte, error)
|
|
// InterfaceUUID returns bitstream's Interface UUID
|
|
InterfaceUUID() string
|
|
// AcceleratorTypeUUID returns bitstream's AFU UUID
|
|
AcceleratorTypeUUID() string
|
|
// UniqueUUID returns UUID that uniquely identifies bitstream
|
|
UniqueUUID() string
|
|
// InstallPath returns unique filename for bitstream relative to given directory
|
|
InstallPath(string) string
|
|
// ExtraMetadata returns map of key/value with additional metadata that can be detected from bitstream
|
|
ExtraMetadata() map[string]string
|
|
}
|