MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / GetSet

Method GetSet

internal/firewalls/nftables/table.go:94–104  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

92}
93
94func (this *Table) GetSet(name string) (*Set, error) {
95 rawSet, err := this.conn.Raw().GetSetByName(this.rawTable, name)
96 if err != nil {
97 if strings.Contains(err.Error(), "no such file or directory") {
98 return nil, ErrSetNotFound
99 }
100 return nil, err
101 }
102
103 return NewSet(this.conn, rawSet), nil
104}
105
106func (this *Table) AddSet(name string, options *SetOptions) (*Set, error) {
107 if len(name) > MaxSetNameLength {

Callers 4

DeleteSetMethod · 0.95
initMethod · 0.80
TestTable_GetSetFunction · 0.80
getIPv4SetFunction · 0.80

Calls 4

NewSetFunction · 0.85
RawMethod · 0.45
ContainsMethod · 0.45
ErrorMethod · 0.45

Tested by 2

TestTable_GetSetFunction · 0.64
getIPv4SetFunction · 0.64