Documentation ¶
Overview ¶
Package publisher provides a type to publish names to a mounttable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T manages the publishing of names and servers in the mounttable. It spawns an internal goroutine the periodically performs mount and unmount rpcs. T is safe to use concurrently.
func New ¶
New returns a new publisher that updates mounts on ns every period, and when changes are made to the state.
func (*T) Closed ¶
func (p *T) Closed() <-chan struct{}
Closed returns a channel that is closed when the publisher context is cancelled, and all unmount operations terminate.
func (*T) RemoveServer ¶
RemoveServer removes a server from the list of mounts.
func (*T) Status ¶
func (p *T) Status() ([]rpc.PublisherEntry, <-chan struct{})
Status returns a snapshot of the publisher's current state. The returned channel is closed when the state has become stale and the caller should repoll Status.