operator

package
v0.0.0-...-e7a4890 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

*

  • Copyright (c) 2019-present Future 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 (c) 2019-present Future 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 (c) 2019-present Future 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 (c) 2019-present Future 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

Constants

View Source
const CallInterval = 50 * time.Millisecond

API call interval

Variables

This section is empty.

Functions

func GetCurrentNodeCount

func GetCurrentNodeCount(ctx context.Context, projectID, targetLabel string) (map[string]int64, error)

GetCurrentNodeCount returns map that key=NodePoolName and value=currentSize

func GetOriginalNodePoolSize

func GetOriginalNodePoolSize(ctx context.Context, projectID, targetLabel, labelValue string) (map[string]int64, error)

GetOriginalNodePoolSize returns map that key=instanceGroupName and value=originalSize

func SetLableIfNoLabel

func SetLableIfNoLabel(ctx context.Context, projectID, targetLabel string) error

Types

type ComputeEngineCall

type ComputeEngineCall struct {
	// contains filtered or unexported fields
}

func ComputeEngine

func ComputeEngine(ctx context.Context, projectID string) *ComputeEngineCall

func (*ComputeEngineCall) Filter

func (r *ComputeEngineCall) Filter(labelName, value string) *ComputeEngineCall

func (*ComputeEngineCall) Start

func (r *ComputeEngineCall) Start() (*model.Report, error)

func (*ComputeEngineCall) Stop

func (r *ComputeEngineCall) Stop() (*model.Report, error)

type GKENodePoolCall

type GKENodePoolCall struct {
	// contains filtered or unexported fields
}

func GKENodePool

func GKENodePool(ctx context.Context, projectID string) *GKENodePoolCall

func (*GKENodePoolCall) Filter

func (r *GKENodePoolCall) Filter(labelName, value string) *GKENodePoolCall

func (*GKENodePoolCall) Recovery

func (r *GKENodePoolCall) Recovery() (*model.Report, error)

func (*GKENodePoolCall) Resize

func (r *GKENodePoolCall) Resize(size int64) (*model.Report, error)

type InstanceGroupCall

type InstanceGroupCall struct {
	// contains filtered or unexported fields
}

func InstanceGroup

func InstanceGroup(ctx context.Context, projectID string) *InstanceGroupCall

func (*InstanceGroupCall) Filter

func (r *InstanceGroupCall) Filter(labelName, value string) *InstanceGroupCall

func (*InstanceGroupCall) Recovery

func (r *InstanceGroupCall) Recovery() (*model.Report, error)

func (*InstanceGroupCall) Resize

func (r *InstanceGroupCall) Resize(size int64) (*model.Report, error)

type SQLCall

type SQLCall struct {
	// contains filtered or unexported fields
}

func SQL

func SQL(ctx context.Context, projectID string) *SQLCall

func (*SQLCall) Filter

func (r *SQLCall) Filter(labelName, value string) *SQLCall

func (*SQLCall) Start

func (r *SQLCall) Start() (*model.Report, error)

func (*SQLCall) Stop

func (r *SQLCall) Stop() (*model.Report, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL