Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSdsClientNotInit = errors.New("sds client not init")
View Source
var SubscriberRetryPeriod = 3 * time.Second
Functions ¶
func CloseSdsClient ¶
func CloseSdsClient()
func NewSdsClientSingleton ¶
TODO: support sds client index instead of singleton
func RegisterSdsStreamClientFactory ¶ added in v0.25.0
func RegisterSdsStreamClientFactory(f func(config interface{}) (SdsStreamClient, error))
Types ¶
type SdsClientImpl ¶
type SdsClientImpl struct { SdsCallbackMap map[string]types.SdsUpdateCallbackFunc // contains filtered or unexported fields }
func (*SdsClientImpl) AddUpdateCallback ¶
func (client *SdsClientImpl) AddUpdateCallback(name string, callback types.SdsUpdateCallbackFunc) error
func (*SdsClientImpl) DeleteUpdateCallback ¶
func (client *SdsClientImpl) DeleteUpdateCallback(name string) error
DeleteUpdateCallback
type SdsStreamClient ¶
type SdsStreamClient interface { // Send creates a secret discovery request with name, and send it to server Send(name string) error // Recv receive a secret discovert response, handle it and send a ack response Recv(provider types.SecretProvider, callback func()) error // Stop stops a stream client Stop() }
func GetSdsStreamClient ¶ added in v0.25.0
func GetSdsStreamClient(config interface{}) (SdsStreamClient, error)
type SdsSubscriber ¶
type SdsSubscriber struct {
// contains filtered or unexported fields
}
func NewSdsSubscriber ¶
func NewSdsSubscriber(provider types.SecretProvider, sdsConfig interface{}) *SdsSubscriber
func (*SdsSubscriber) SendSdsRequest ¶
func (subscribe *SdsSubscriber) SendSdsRequest(name string)
func (*SdsSubscriber) Start ¶
func (subscribe *SdsSubscriber) Start()
func (*SdsSubscriber) Stop ¶
func (subscribe *SdsSubscriber) Stop()
Click to show internal directories.
Click to hide internal directories.