ContainerImage.Pinniped/internal/testutil/observable_with_initial_event_option.go
Matt Moyer 8c9c1e206d
Update module/package names to match GitHub org switch.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
2020-09-17 12:56:54 -05:00

24 lines
655 B
Go

// Copyright 2020 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package testutil
import "github.com/vmware-tanzu/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
}