Documentation ¶
Index ¶
Constants ¶
const DefaultProxyBrokerPrefix = "sm-"
DefaultProxyBrokerPrefix prefix for brokers registered by the proxy
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶ added in v0.4.0
type Consumer interface {
Consume(ctx context.Context, notification *types.Notification)
}
Consumer provides functionality for consuming notifications
type Reconciler ¶ added in v0.4.0
Reconciler takes care of propagating broker and visibility changes to the platform. TODO if the reg credentials are changed (the ones under cf.reg) we need to update the already registered brokers
func (*Reconciler) Reconcile ¶ added in v0.4.0
func (r *Reconciler) Reconcile(ctx context.Context, messages <-chan *notifications.Message, group *sync.WaitGroup)
Reconcile listens for notification messages and either consumes the notification or triggers a resync
type Resyncer ¶ added in v0.4.0
Resyncer provides functionality for triggering a resync on the platform
func NewResyncer ¶ added in v0.4.0
func NewResyncer(settings *Settings, platformClient platform.Client, smClient sm.Client, smSettings *sm.Settings, smPath, proxyPathPattern string) Resyncer
NewResyncer returns a resyncer that reconciles the state of the proxy brokers and visibilities in the platform to match the desired state provided by the Service Manager.
type Settings ¶
type Settings struct { LegacyURL string `mapstructure:"legacy_url"` MaxParallelRequests int `mapstructure:"max_parallel_requests"` URL string `mapstructure:"url"` BrokerPrefix string `mapstructure:"broker_prefix"` BrokerBlacklist []string `mapstructure:"broker_blacklist"` TakeoverEnabled bool `mapstructure:"takeover_enabled"` BrokerCredentialsEnabled bool `mapstructure:"broker_credentials_enabled"` VisibilityBrokerChunkSize int `mapstructure:"visibility_broker_chunk_size"` }
Settings type represents the sbproxy settings
func DefaultSettings ¶
func DefaultSettings() *Settings
DefaultSettings creates default proxy settings
type TaskScheduler ¶ added in v0.8.1
type TaskScheduler struct {
// contains filtered or unexported fields
}
TaskScheduler schedules tasks to be executed in parallel
func NewScheduler ¶ added in v0.8.1
func NewScheduler(ctx context.Context, maxParallelTasks int) *TaskScheduler
NewScheduler return a new task scheduler configured to execute a maximum of maxParallelTasks concurrently
func (*TaskScheduler) Await ¶ added in v0.8.1
func (state *TaskScheduler) Await() error
Await waits for the completion of all scheduled tasks
type TimestampedError ¶ added in v0.7.1
TimestampedError contains an error and a timestamp in time.RFC3339Nano format
func (TimestampedError) Error ¶ added in v0.7.1
func (te TimestampedError) Error() string