ContainerImage.Pinniped/internal/testutil/observable_with_initial_event_option.go
Matt Moyer a503fa8673 Pull controller-go back into this repository as internal/controllerlib.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
2020-08-28 13:07:47 -05:00

26 lines
619 B
Go

/*
Copyright 2020 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/
package testutil
import "github.com/suzerain-io/pinniped/internal/controllerlib"
type ObservableWithInitialEventOption struct {
key controllerlib.Key
}
func NewObservableWithInitialEventOption() *ObservableWithInitialEventOption {
return &ObservableWithInitialEventOption{}
}
func (i *ObservableWithInitialEventOption) WithInitialEvent(key controllerlib.Key) controllerlib.Option {
i.key = key
return controllerlib.WithInitialEvent(key)
}
func (i *ObservableWithInitialEventOption) GetInitialEventKey() controllerlib.Key {
return i.key
}