package client
import "github.com/hashicorp/serf/client"
Index ¶
- type Member
- type RPCClient
- func NewRPCClient(addr string) (*RPCClient, error)
- func (c *RPCClient) Close() error
- func (c *RPCClient) ForceLeave(node string) error
- func (c *RPCClient) Join(addrs []string, replay bool) (int, error)
- func (c *RPCClient) Leave() error
- func (c *RPCClient) Members() ([]Member, error)
- func (c *RPCClient) Monitor(level logutils.LogLevel, ch chan<- string) (StreamHandle, error)
- func (c *RPCClient) Stop(handle StreamHandle) error
- func (c *RPCClient) Stream(filter string, ch chan<- map[string]interface{}) (StreamHandle, error)
- func (c *RPCClient) UserEvent(name string, payload []byte, coalesce bool) error
- type StreamHandle
Types ¶
type Member ¶
type Member struct { Name string Addr net.IP Port uint16 Tags map[string]string Status string ProtocolMin uint8 ProtocolMax uint8 ProtocolCur uint8 DelegateMin uint8 DelegateMax uint8 DelegateCur uint8 }
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
RPCClient is the RPC client to make requests to the agent RPC.
func NewRPCClient ¶
NewRPCClient is used to create a new RPC client given the address. This will properly dial, handshake, and start listening
func (*RPCClient) Close ¶
Close is used to free any resources associated with the client
func (*RPCClient) ForceLeave ¶
ForceLeave is used to ask the agent to issue a leave command for a given node
func (*RPCClient) Join ¶
Join is used to instruct the agent to attempt a join
func (*RPCClient) Leave ¶
Leave is used to trigger a graceful leave and shutdown
func (*RPCClient) Members ¶
Members is used to fetch a list of known members
func (*RPCClient) Monitor ¶
Monitor is used to subscribe to the logs of the agent
func (*RPCClient) Stop ¶
func (c *RPCClient) Stop(handle StreamHandle) error
Stop is used to unsubscribe from logs or event streams
func (*RPCClient) Stream ¶
func (c *RPCClient) Stream(filter string, ch chan<- map[string]interface{}) (StreamHandle, error)
Stream is used to subscribe to events
func (*RPCClient) UserEvent ¶
UserEvent is used to trigger sending an event
type StreamHandle ¶
type StreamHandle uint64
StreamHandle is an opaque handle passed to stop to stop streaming
Source Files ¶
- Version
- v0.4.1
- Published
- Feb 3, 2014
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 3 weeks ago –
Tools for package owners.