mirror of
https://github.com/slimtoolkit/slim.git
synced 2025-06-03 04:00:23 +00:00

Similarly to the compose mode, this series of squashed commits adds support for Kubernetes as an execution environment for the target container image. The branch is a few months old, so it has been squashed to a single commit to reduce the complexity of the rebase & merge. Below are the messages from the squashed commits: [Refactoring] Group all Node.js inspect flags into a single DTO With the upcoming addition of Kubernetes support, we need to figure out a way of sharing code between the existing container.Insepector and the new pod.Inspector. In particular, it can be done through shared config objects. [Refactoring] Extract fat image building into a separate function [Refactoring] Extract fat image inspection into a separate subroutine. Bring in Kubernetes client-go dependency Fix github.com/getkin/kin-openapi usage - got broken by version bump Finding K8s workloads Inspecting fat kubernetes workload image Injecting sensor into K8s workload - initial phase Introduce `kubectl` client Injecting sensor into pod (cont.) Get artifacts from the pod [Refactoring] Extract building slim images into a subroutine Put the rest of the build.handler logic to the kubernetes build subroutine Applying Kubernetes manifest(s) [Refactoring] Revamped Kubernetes Workload Finder [Refactoring] Reshape Kubernetes logic Scale down Kubernetes workloads after slimming Restore Kubernetes workload to the original state if no manifest is used [Refactoring] Introduce HTTPProbeOptions struct and refactor the code Basic Kubernetes workload monitoring - CAMEnter, CAMTimeout, CAMSignal, CAMExec Fix (workaround) for kubectl cp missing file permissions master rebase [Refactoring] Remove unused HTTP Probe Proxy flags Fix HTTP probe having no ports Use latest set of e2e tests HTTP probe for Kubernetes workloads Refine Kubernetes-related flag names Bump down Kubernetes deps to v1.22 to keep Go at v1.16
75 lines
1.1 KiB
Go
75 lines
1.1 KiB
Go
package jsoniter
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
type int64Any struct {
|
|
baseAny
|
|
val int64
|
|
}
|
|
|
|
func (any *int64Any) LastError() error {
|
|
return nil
|
|
}
|
|
|
|
func (any *int64Any) ValueType() ValueType {
|
|
return NumberValue
|
|
}
|
|
|
|
func (any *int64Any) MustBeValid() Any {
|
|
return any
|
|
}
|
|
|
|
func (any *int64Any) ToBool() bool {
|
|
return any.val != 0
|
|
}
|
|
|
|
func (any *int64Any) ToInt() int {
|
|
return int(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToInt32() int32 {
|
|
return int32(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToInt64() int64 {
|
|
return any.val
|
|
}
|
|
|
|
func (any *int64Any) ToUint() uint {
|
|
return uint(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToUint32() uint32 {
|
|
return uint32(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToUint64() uint64 {
|
|
return uint64(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToFloat32() float32 {
|
|
return float32(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToFloat64() float64 {
|
|
return float64(any.val)
|
|
}
|
|
|
|
func (any *int64Any) ToString() string {
|
|
return strconv.FormatInt(any.val, 10)
|
|
}
|
|
|
|
func (any *int64Any) WriteTo(stream *Stream) {
|
|
stream.WriteInt64(any.val)
|
|
}
|
|
|
|
func (any *int64Any) Parse() *Iterator {
|
|
return nil
|
|
}
|
|
|
|
func (any *int64Any) GetInterface() interface{} {
|
|
return any.val
|
|
}
|