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 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 ¶
func (d *Connector) GetPayload(ctx context.Context, req *connectorpb.GetPayloadRequest) (*connectorpb.GetPayloadResponse, error)
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 ¶
func (d *Connector) SetPayload(ctx context.Context, req *connectorpb.SetPayloadRequest) (*connectorpb.SetPayloadResponse, error)
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
Click to show internal directories.
Click to hide internal directories.