hazelcast

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

README

Kubemq Hazelcast Target Connector

Kubemq hazelcast target connector allows services using kubemq server to access hazelcast server functions such set, get and delete.

Prerequisites

The following are required to run the hazelcast target connector:

  • kubemq cluster
  • hazelcast
  • kubemq-targets deployment

Configuration

hazelcast target connector configuration properties:

Properties Key Required Description Example
address yes hazelcast connection string "localhost:5701"
username no hazelcast username "admin"
password no hazelcast password "password"
connectionAttemptLimit no hazelcast connection attempts(default 1) 1
connectionAttemptPeriod no hazelcast attempt period seconds(default 5) 5
connectionTimeout no hazelcast connection timeout seconds(default 5) 5
ssl no hazelcast use ssl false
sslcertificatefile no hazelcast certificate file ""
sslcertificatekey no hazelcast certificate key ""
serverName no hazelcast server name "myserver"

Example:

bindings:
  - name: kubemq-hazelcast
    source:
      kind: kubemq.query
      properties:
        address: localhost:50000
        channel: query.hazelcast
    target:
      kind: cache.hazelcast
      properties:
        address: localhost:5701
        server_name: test
    properties: {}

Usage

Get Request

Get request metadata setting:

Metadata Key Required Description Possible values
key yes hazelcast key string any string
method yes get "get"
map_name yes hazelcast map name "my_map"

Example:

{
  "metadata": {
    "key": "your-hazelcast-key",
    "map_name": "my_map",
    "method": "get"
  },
  "data": null
}
Set Request

Set request metadata setting:

Metadata Key Required Description Possible values
key yes hazelcast key any string
method yes set "set"
map_name yes hazelcast map name "my_map"

Set request data setting:

Data Key Required Description Possible values
data yes data to set for the hazelcast key base64 bytes array

Example:

{
  "metadata": {
    "key": "your-hazelcast-key",
    "map_name": "my_map",
    "method": "set"
  },
  "data": "c29tZS1kYXRh" 
}
Delete Request

Delete request metadata setting:

Metadata Key Required Description Possible values
key yes hazelcast key string any string
method yes delete "delete"
map_name yes hazelcast map name "my_map"

Example:

{
  "metadata": {
    "key": "your-hazelcast-key",
    "map_name": "my_map",
    "method": "delete"
  },
  "data": null
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connector

func Connector() *common.Connector

Types

type Client

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

Client is a Client state store

func New

func New() *Client

func (*Client) Connector

func (c *Client) Connector() *common.Connector

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *types.Request) (*types.Response, error)

func (*Client) Init

func (c *Client) Init(ctx context.Context, cfg config.Spec, log *logger.Logger) error

func (*Client) Stop

func (c *Client) Stop() error

Jump to

Keyboard shortcuts

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