Documentation ¶
Overview ¶
Copyright 2017 The Kubernetes Authors 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.
Index ¶
- func ConvertToAPICondition(condition types.Condition) api.NodeCondition
- func ConvertToAPIConditionStatus(status types.ConditionStatus) api.ConditionStatus
- func ConvertToAPIEventType(severity types.Severity) string
- func ConvertToAPITimestamp(timestamp time.Time) unversioned.Time
- func GenerateConditionChangeEvent(t string, status types.ConditionStatus, reason string, timestamp time.Time) types.Event
- func ReturnHTTPError(w http.ResponseWriter, err error)
- func ReturnHTTPJson(w http.ResponseWriter, object interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToAPICondition ¶
func ConvertToAPICondition(condition types.Condition) api.NodeCondition
ConvertToAPICondition converts the internal node condition to api.NodeCondition.
func ConvertToAPIConditionStatus ¶
func ConvertToAPIConditionStatus(status types.ConditionStatus) api.ConditionStatus
ConvertToAPIConditionStatus converts the internal node condition status to api.ConditionStatus.
func ConvertToAPIEventType ¶
ConvertToAPIEventType converts the internal severity to event type.
func ConvertToAPITimestamp ¶
func ConvertToAPITimestamp(timestamp time.Time) unversioned.Time
ConvertToAPITimestamp converts the timestamp to unversioned.Time
func GenerateConditionChangeEvent ¶ added in v0.5.0
func GenerateConditionChangeEvent(t string, status types.ConditionStatus, reason string, timestamp time.Time) types.Event
GenerateConditionChangeEvent generates an event for condition change.
func ReturnHTTPError ¶ added in v0.3.0
func ReturnHTTPError(w http.ResponseWriter, err error)
ReturnHTTPError generates error http response.
func ReturnHTTPJson ¶ added in v0.3.0
func ReturnHTTPJson(w http.ResponseWriter, object interface{})
ReturnHTTPJson generates json http response.
Types ¶
This section is empty.