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
- Variables
- func CallClusterOperation(config *hazelcast.Config, operation string) (*string, error)
- func CallClusterOperationWithState(config *hazelcast.Config, operation string, state *string) (*string, error)
- func ConnectToCluster(ctx context.Context, clientConfig *hazelcast.Config) (cli *hazelcast.Client, err error)
- func DefaultConfig() *hazelcast.Config
- func DefautConfigPath() string
- func EnsureState(state string) bool
- func ErrorRecover()
- func MakeConfig() (*hazelcast.Config, error)
- func NewParams(config *hazelcast.Config, operation string, state string) string
- func TranslateClusterError(err error, operation string) (string, bool)
- func TranslateError(err error, isCloudCluster bool, op ...string) (string, bool)
- func TranslateNetworkError(err error, isCloudCluster bool) (string, bool)
- type RESTCall
Constants ¶
const ( DefaultClusterAddress = "localhost:5701" DefaultClusterName = "dev" )
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" )
const ( ClusterGetState = "get-state" ClusterChangeState = "change-state" ClusterShutdown = "shutdown" ClusterVersion = "version" )
const ( ClusterStateActive = "active" ClusterStateNoMigration = "no_migration" ClusterStatePassive = "passive" ClusterStateFrozen = "frozen" )
const ( TypeString = "string" TypeJSON = "json" )
Variables ¶
var ( Configuration *hazelcast.Config CfgFile string Cluster string Token string Address string )
var InvalidStateErr = errors.New("invalid new state")
Functions ¶
func CallClusterOperation ¶
func ConnectToCluster ¶
func DefaultConfig ¶
func DefaultConfig() *hazelcast.Config
func DefautConfigPath ¶
func DefautConfigPath() string
func EnsureState ¶
func ErrorRecover ¶
func ErrorRecover()
func MakeConfig ¶
func MakeConfig() (*hazelcast.Config, error)