Documentation
¶
Overview ¶
Package sgtest provides an in-memory sgfilter.Source for service tests.
Index ¶
- func Loopback() net.Addr
- func OpenTo(id string, port int, cidr string) sgfilter.Group
- type Source
- func (s *Source) DefaultGroupID(string) string
- func (s *Source) Enforcer() *sgfilter.Enforcer
- func (s *Source) GroupsOfAddr(a netip.Addr) []string
- func (s *Source) SecurityGroups(ids []string) []sgfilter.Group
- func (s *Source) Set(groups ...sgfilter.Group)
- func (s *Source) SetMembers(m map[netip.Addr][]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Source ¶
type Source struct {
// DefaultID is returned for every VPC; empty means no default group.
DefaultID string
// contains filtered or unexported fields
}
Source serves security groups that tests replace at will, so rule edits can be applied between connections.
func (*Source) DefaultGroupID ¶
DefaultGroupID implements sgfilter.DefaultGroupSource.
func (*Source) GroupsOfAddr ¶
GroupsOfAddr implements sgfilter.Source.
func (*Source) SecurityGroups ¶
SecurityGroups implements sgfilter.Source.
Click to show internal directories.
Click to hide internal directories.