sbSwitchProxy

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(cli client.Client) func(*SbSwitchProxy)

func DoneCh

func DoneCh(ch chan struct{}) func(*SbSwitchProxy)

DoneCh is a functional option allows you to pass a channel to the proxy object. This channel will be closed by this object. It serves as a notification that the object can be deleted.

func EventHandler

func EventHandler(h func(sw.Switcher, sw.Device)) func(*SbSwitchProxy)

EventHandler sets a callback function through which the proxy rotator will report Events

func Name

func Name(name string) func(*SbSwitchProxy)

func ServiceName

func ServiceName(name string) func(*SbSwitchProxy)

Types

type SbSwitchProxy

type SbSwitchProxy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(opts ...func(*SbSwitchProxy)) (*SbSwitchProxy, error)

func (*SbSwitchProxy) Close

func (s *SbSwitchProxy) Close()

func (*SbSwitchProxy) GetPort

func (s *SbSwitchProxy) GetPort(portName string) (sw.Port, error)

func (*SbSwitchProxy) Name

func (s *SbSwitchProxy) Name() string

func (*SbSwitchProxy) Serialize

func (s *SbSwitchProxy) Serialize() sw.Device

func (*SbSwitchProxy) SetPort

func (s *SbSwitchProxy) SetPort(port sw.Port) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL