Documentation
¶
Index ¶
- Variables
- type ConnectionManager
- type MutableGroupManager
- func (m *MutableGroupManager) AddToGroup(group, tag string) error
- func (m *MutableGroupManager) CheckOutbounds(group string) error
- func (m *MutableGroupManager) Close()
- func (m *MutableGroupManager) CreateEndpointForGroup(ctx context.Context, router A.Router, logger log.ContextLogger, ...) error
- func (m *MutableGroupManager) CreateOutboundForGroup(ctx context.Context, router A.Router, logger log.ContextLogger, ...) error
- func (m *MutableGroupManager) OutboundGroup(tag string) (adapter.MutableOutboundGroup, bool)
- func (m *MutableGroupManager) OutboundGroups() []adapter.MutableOutboundGroup
- func (m *MutableGroupManager) RemoveFromGroup(group, tag string) error
- func (m *MutableGroupManager) ReplaceInGroup(group, tag string) error
- func (m *MutableGroupManager) SetURLOverrides(group string, overrides map[string]string) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrIsClosed = errors.New("manager is closed")
)
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶
type ConnectionManager interface {
Connections() []trafficontrol.TrackerMetadata
}
type MutableGroupManager ¶
type MutableGroupManager struct {
// contains filtered or unexported fields
}
func NewMutableGroupManager ¶
func NewMutableGroupManager( logger logger.ContextLogger, outboundManager A.OutboundManager, endpointManager A.EndpointManager, connectionManager ConnectionManager, groups []adapter.MutableOutboundGroup, ) *MutableGroupManager
func (*MutableGroupManager) AddToGroup ¶
func (m *MutableGroupManager) AddToGroup(group, tag string) error
func (*MutableGroupManager) CheckOutbounds ¶
func (m *MutableGroupManager) CheckOutbounds(group string) error
CheckOutbounds triggers an immediate URL test cycle on the specified group. The group must implement adapter.OutboundChecker.
func (*MutableGroupManager) Close ¶
func (m *MutableGroupManager) Close()
func (*MutableGroupManager) CreateEndpointForGroup ¶
func (m *MutableGroupManager) CreateEndpointForGroup( ctx context.Context, router A.Router, logger log.ContextLogger, group, tag, typ string, options any, ) error
CreateEndpointForGroup creates an endpoint and adds it to the specified group.
func (*MutableGroupManager) CreateOutboundForGroup ¶
func (m *MutableGroupManager) CreateOutboundForGroup( ctx context.Context, router A.Router, logger log.ContextLogger, group, tag, typ string, options any, ) error
CreateOutboundForGroup creates an outbound and adds it to the specified group. If the group already holds the tag and implements adapter.MemberReplacer, the new outbound is swapped in for the one it replaced.
func (*MutableGroupManager) OutboundGroup ¶
func (m *MutableGroupManager) OutboundGroup(tag string) (adapter.MutableOutboundGroup, bool)
func (*MutableGroupManager) OutboundGroups ¶
func (m *MutableGroupManager) OutboundGroups() []adapter.MutableOutboundGroup
func (*MutableGroupManager) RemoveFromGroup ¶
func (m *MutableGroupManager) RemoveFromGroup(group, tag string) error
RemoveFromGroup removes an outbound/endpoint from the specified group.
func (*MutableGroupManager) ReplaceInGroup ¶ added in v0.0.180
func (m *MutableGroupManager) ReplaceInGroup(group, tag string) error
ReplaceInGroup swaps the outbound/endpoint currently registered under tag into the specified group in place of the member's old one, for an outbound recreated under the same tag. The group must implement adapter.MemberReplacer and tag must already be a member.
func (*MutableGroupManager) SetURLOverrides ¶
func (m *MutableGroupManager) SetURLOverrides(group string, overrides map[string]string) error
SetURLOverrides updates the per-outbound URL test overrides for the specified group. The group must implement adapter.URLOverrideSetter.