reactive_value_static.go 384 B

123456789101112131415161718192021222324252627
  1. package ultraviolet
  2. type ValueStatic struct {
  3. value any
  4. }
  5. func NewValueStatic(value any) *ValueStatic {
  6. return &ValueStatic{
  7. value: value,
  8. }
  9. }
  10. func (this *ValueStatic) Start() error {
  11. return nil
  12. }
  13. func (this *ValueStatic) Stop() error {
  14. return nil
  15. }
  16. func (this *ValueStatic) Value() any {
  17. return this.value
  18. }
  19. func (this *ValueStatic) Invalidate() bool {
  20. return false
  21. }