Documentation ¶
Overview ¶
Copyright 2021 IBM Corporation
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 IBM Corporation ¶
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 IBM Corporation ¶
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 IBM Corporation ¶
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 ¶
- func CalcMemCapacity(reqModelKey string, defaultSize int, multiplier float64, log logr.Logger) uint64
- func ClearDirectoryContents(dirPath string, condition func(entry os.DirEntry) bool) error
- func FileExists(path string) (bool, error)
- func GetModelType(req *mmesh.LoadModelRequest, log logr.Logger) string
- func GetSchemaPath(req *mmesh.LoadModelRequest) (string, error)
- func RemoveFileFromListOfFileInfo(filename string, files []os.DirEntry) (bool, []os.DirEntry)
- func ResolveLocalGrpcEndpoint(servingRuntimeEndpoint string) (string, error)
- func SecureJoin(elem ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcMemCapacity ¶ added in v0.9.0
func ClearDirectoryContents ¶ added in v0.10.0
ClearDirectoryContents Clear contents of directory if it exists. If condition is specified then only delete dir entries to which it returns true
func GetModelType ¶ added in v0.8.0
func GetModelType(req *mmesh.LoadModelRequest, log logr.Logger) string
GetModelType first tries to read the type from the LoadModelRequest.ModelKey json If there is an error parsing LoadModelRequest.ModelKey or the type is not found there, this will return the LoadModelRequest.ModelType which could possibly be an empty string
func GetSchemaPath ¶ added in v0.8.0
func GetSchemaPath(req *mmesh.LoadModelRequest) (string, error)
GetSchemaPath extracts the schema path from the ModelKey field Will return an error if schema path exists but is in an invalid format
func RemoveFileFromListOfFileInfo ¶
RemoveFileFromListOfFileInfo The input `files` content is modified, the order of elements is changed
func ResolveLocalGrpcEndpoint ¶ added in v0.10.0
func SecureJoin ¶
Types ¶
This section is empty.