Documentation
¶
Index ¶
- Constants
- Variables
- func Init() (*synccontext.RegisterContext, error)
- func InitWithOptions(opts Options) (*synccontext.RegisterContext, error)
- func MustInit() *synccontext.RegisterContext
- func MustRegister(syncer syncer.Base)
- func MustStart()
- func Register(syncer syncer.Base) error
- func Start() error
- type ApiVersionKindType
- type LeaderElectionHook
- type Manager
- type Options
Constants ¶
View Source
const ( PLUGIN_SERVER_ADDRESS = "VCLUSTER_PLUGIN_ADDRESS" PLUGIN_NAME = "VCLUSTER_PLUGIN_NAME" )
Variables ¶
View Source
var (
Scheme = runtime.NewScheme()
)
Functions ¶
func Init ¶
func Init() (*synccontext.RegisterContext, error)
func InitWithOptions ¶
func InitWithOptions(opts Options) (*synccontext.RegisterContext, error)
func MustInit ¶
func MustInit() *synccontext.RegisterContext
func MustRegister ¶
Types ¶
type ApiVersionKindType ¶ added in v0.2.0
type LeaderElectionHook ¶ added in v0.2.0
type Manager ¶
type Manager interface {
// Init creates a new plugin context and will block until the
// vcluster container instance could be contacted.
Init() (*synccontext.RegisterContext, error)
// InitWithOptions creates a new plugin context and will block until the
// vcluster container instance could be contacted.
InitWithOptions(opts Options) (*synccontext.RegisterContext, error)
// Register makes sure the syncer will be executed as soon as start
// is run.
Register(syncer syncer.Base) error
// Start runs all the registered syncers and will block. It only executes
// the functionality if the current vcluster pod is the current leader and
// will stop if the pod will lose leader election.
Start() error
}
type Options ¶
type Options struct {
// ListenAddress is optional and the address where to contact
// the vcluster plugin server at. Defaults to localhost:10099
ListenAddress string
// NewClient is the func that creates the client to be used by the manager.
// If not set this will create the default DelegatingClient that will
// use the cache for reads and the client for writes.
NewClient cluster.NewClientFunc
// NewCache is the function that will create the cache to be used
// by the manager. If not set this will use the default new cache function.
NewCache cache.NewCacheFunc
}
Click to show internal directories.
Click to hide internal directories.