WithInterfaceFilter sets a filter function to whitelist or blacklist network interfaces for ICE candidate gathering. The filter function receives the interface name and should return true to keep the interface, or false to exclude it. Example: // Only use interfaces starting with "eth" agent, e
(filter func(string) bool)
| 996 | // }), |
| 997 | // ) |
| 998 | func WithInterfaceFilter(filter func(string) bool) AgentOption { |
| 999 | return func(a *Agent) error { |
| 1000 | if a.constructed { |
| 1001 | return ErrAgentOptionNotUpdatable |
| 1002 | } |
| 1003 | |
| 1004 | a.interfaceFilter = filter |
| 1005 | |
| 1006 | return nil |
| 1007 | } |
| 1008 | } |
| 1009 | |
| 1010 | // WithLoggerFactory sets the logger factory for the agent. |
| 1011 | // |
no outgoing calls
searching dependent graphs…