{"modulePath":"github.com/AliyunContainerService/node-problem-detector","version":"v0.6.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package util\n\nCopyright 2017 The Kubernetes Authors All rights reserved.\n\nLicensed 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\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless 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.\n\n## Functions\n\n```go\nfunc ConvertToAPICondition(condition types.Condition) v1.NodeCondition\n```\nConvertToAPICondition converts the internal node condition to v1.NodeCondition.\n\n```go\nfunc ConvertToAPIConditionStatus(status types.ConditionStatus) v1.ConditionStatus\n```\nConvertToAPIConditionStatus converts the internal node condition status to v1.ConditionStatus.\n\n```go\nfunc ConvertToAPIEventType(severity types.Severity) string\n```\nConvertToAPIEventType converts the internal severity to event type.\n\n```go\nfunc ConvertToAPITimestamp(timestamp time.Time) metav1.Time\n```\nConvertToAPITimestamp converts the timestamp to metav1.Time\n\n```go\nfunc GenerateConditionChangeEvent(t string, status types.ConditionStatus, reason string, timestamp time.Time) types.Event\n```\nGenerateConditionChangeEvent generates an event for condition change.\n\n```go\nfunc GetStartTime(now time.Time, uptimeDuration time.Duration, lookbackStr string, delayStr string) (time.Time, error)\n```\n\n```go\nfunc GetUptimeDuration() (time.Duration, error)\n```\n\n```go\nfunc ReturnHTTPError(w http.ResponseWriter, err error)\n```\nReturnHTTPError generates error http response.\n\n```go\nfunc ReturnHTTPJson(w http.ResponseWriter, object interface{})\n```\nReturnHTTPJson generates json http response.\n\n","path":"github.com/AliyunContainerService/node-problem-detector/pkg/util","name":"util","synopsis":"","isRedistributable":true}
