Documentation ¶
Overview ¶
Package client
Index ¶
- type OpenSergoClient
- func (c *OpenSergoClient) CurrentStreamStatus() OpensergoClientStreamStatus
- func (c *OpenSergoClient) Start() error
- func (c *OpenSergoClient) SubscribeConfig(subscribeKey model.SubscribeKey, opts ...api.SubscribeOption) error
- func (c *OpenSergoClient) SubscribeDataCache() *subscribe.SubscribeDataCache
- func (c *OpenSergoClient) SubscriberRegistry() *subscribe.SubscriberRegistry
- func (c *OpenSergoClient) UnsubscribeConfig(subscribeKey model.SubscribeKey) error
- type OpensergoClientStreamStatus
- type SubscribeConfigStreamObserver
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) 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()
Click to show internal directories.
Click to hide internal directories.