internal

package
v1.0.0-test.10 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

* Copyright (c) 2008-2021, Hazelcast, Inc. 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.

* Copyright (c) 2008-2021, Hazelcast, Inc. 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.

* Copyright (c) 2008-2021, Hazelcast, Inc. 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.

* Copyright (c) 2008-2021, Hazelcast, Inc. 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.

* Copyright (c) 2008-2021, Hazelcast, Inc. 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.

* Copyright (c) 2008-2021, Hazelcast, Inc. 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.

* Copyright (c) 2008-2021, Hazelcast, Inc. 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

Constants

View Source
const (
	DefaultClusterAddress = "localhost:5701"
	DefaultClusterName    = "dev"
)
View Source
const (
	ClusterGetStateEndpoint    = "/hazelcast/rest/management/cluster/state"
	ClusterChangeStateEndpoint = "/hazelcast/rest/management/cluster/changeState"
	ClusterShutdownEndpoint    = "/hazelcast/rest/management/cluster/clusterShutdown"
	ClusterVersionEndpoint     = "/hazelcast/rest/management/cluster/version"
)
View Source
const (
	ClusterGetState    = "get-state"
	ClusterChangeState = "change-state"
	ClusterShutdown    = "shutdown"
	ClusterVersion     = "version"
)
View Source
const (
	ClusterStateActive      = "active"
	ClusterStateNoMigration = "no_migration"
	ClusterStatePassive     = "passive"
	ClusterStateFrozen      = "frozen"
)
View Source
const (
	TypeString = "string"
	TypeJSON   = "json"
)

Variables

View Source
var (
	Configuration *hazelcast.Config
	CfgFile       string
	Cluster       string
	Token         string
	Address       string
)
View Source
var InvalidStateErr = errors.New("invalid new state")

Functions

func CallClusterOperation

func CallClusterOperation(config *hazelcast.Config, operation string) (*string, error)

func CallClusterOperationWithState

func CallClusterOperationWithState(config *hazelcast.Config, operation string, state *string) (*string, error)

func ConnectToCluster

func ConnectToCluster(ctx context.Context, clientConfig *hazelcast.Config) (cli *hazelcast.Client, err error)

func DefaultConfig

func DefaultConfig() *hazelcast.Config

func DefautConfigPath

func DefautConfigPath() string

func EnsureState

func EnsureState(state string) bool

func ErrorRecover

func ErrorRecover()

func MakeConfig

func MakeConfig() (*hazelcast.Config, error)

func NewParams

func NewParams(config *hazelcast.Config, operation string, state string) string

func TranslateClusterError

func TranslateClusterError(err error, operation string) (string, bool)

func TranslateError

func TranslateError(err error, isCloudCluster bool, op ...string) (string, bool)

func TranslateNetworkError

func TranslateNetworkError(err error, isCloudCluster bool) (string, bool)

Types

type RESTCall

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

func NewRESTCall

func NewRESTCall(config *hazelcast.Config, operation string, state string) (*RESTCall, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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