connector

package
v0.0.0-...-54683fc Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright (c) 2021 Nutanix, Inc.

Copyright (c) 2021 Nutanix, Inc.

Copyright (c) 2021 Nutanix, Inc.

Copyright (c) 2021 Nutanix, Inc.

Copyright (c) 2021 Nutanix, Inc.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConnectorCfg stores the dynamic configuration of the Connector runtime
	ConnectorCfg = &Config{

		Name:          "TemplateConnector",
		dynamicConfig: make(map[string]interface{}),
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string
	ID   string

	sync.RWMutex
	// contains filtered or unexported fields
}

Config type for all configuration data

type Connector

type Connector struct {

	// Registry implements the `GetEvents` method
	*events.Registry
	connectorpb.UnsafeConnectorServiceServer
	// contains filtered or unexported fields
}

Connector implements the ConnectorService gRPC service

func NewConnector

func NewConnector() *Connector

NewConnector is a constructor for the Connector object

func (*Connector) GetPayload

GetPayload returns all payloads given a payload kind:

  • If payload kind is set to STREAM, it should return all available streams (both subscribed and not subscribed)
  • If payload kind is set to CONFIG, it should return the current dynamic config in use.

func (*Connector) SetPayload

SetPayload updates the payloads that connector needs to process:

  • If payload kind is set to STREAM, it should reset the topics being used by subscribing to the streams from the request and unsubscribing the old ones
  • If payload kind is set to CONFIG, it should update the current dynamic config

Jump to

Keyboard shortcuts

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