WithNet sets the underlying network implementation for the agent.
(net transport.Net)
| 513 | |
| 514 | // WithNet sets the underlying network implementation for the agent. |
| 515 | func WithNet(net transport.Net) AgentOption { |
| 516 | return func(a *Agent) error { |
| 517 | if a.constructed { |
| 518 | return ErrAgentOptionNotUpdatable |
| 519 | } |
| 520 | |
| 521 | a.net = net |
| 522 | |
| 523 | return nil |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | // WithMulticastDNSMode configures mDNS behavior for the agent. |
| 528 | func WithMulticastDNSMode(mode MulticastDNSMode) AgentOption { |
no outgoing calls
searching dependent graphs…