client

package
v0.0.0-...-21a6d54 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenSergoClient

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

OpenSergoClient is the client to communicate with opensergo-control-plane.

func NewOpenSergoClient

func NewOpenSergoClient(host string, port uint32) (*OpenSergoClient, error)

NewOpenSergoClient returns an instance of OpenSergoClient, and init some properties.

func (*OpenSergoClient) CurrentStreamStatus

func (c *OpenSergoClient) CurrentStreamStatus() OpensergoClientStreamStatus

func (*OpenSergoClient) Start

func (c *OpenSergoClient) Start() error

Start the OpenSergoClient.

func (*OpenSergoClient) SubscribeConfig

func (c *OpenSergoClient) SubscribeConfig(subscribeKey model.SubscribeKey, opts ...api.SubscribeOption) error

SubscribeConfig sends a subscribe request to opensergo-control-plane, and return the result of subscribe config-data from opensergo-control-plane.

func (*OpenSergoClient) SubscribeDataCache

func (c *OpenSergoClient) SubscribeDataCache() *subscribe.SubscribeDataCache

func (*OpenSergoClient) SubscriberRegistry

func (c *OpenSergoClient) SubscriberRegistry() *subscribe.SubscriberRegistry

func (*OpenSergoClient) UnsubscribeConfig

func (c *OpenSergoClient) UnsubscribeConfig(subscribeKey model.SubscribeKey) error

UnsubscribeConfig sends an un-subscribe request to opensergo-control-plane and remove all the subscribers by subscribeKey.

type OpensergoClientStreamStatus

type OpensergoClientStreamStatus uint8

type SubscribeConfigStreamObserver

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

SubscribeConfigStreamObserver is a struct as an observer role to listen the response of SubscribeConfig() from opensergo-control-plane.

func NewSubscribeConfigStreamObserver

func NewSubscribeConfigStreamObserver(openSergoClient *OpenSergoClient) *SubscribeConfigStreamObserver

func (*SubscribeConfigStreamObserver) SetOpenSergoClient

func (scObserver *SubscribeConfigStreamObserver) SetOpenSergoClient(openSergoClient *OpenSergoClient)

func (*SubscribeConfigStreamObserver) Start

func (scObserver *SubscribeConfigStreamObserver) Start()

Jump to

Keyboard shortcuts

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