MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / initializeIPFnAndClasses

Function initializeIPFnAndClasses

pkg/filament/cpython/ip.go:30–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28var ipaddressFn *PyObject
29
30func initializeIPFnAndClasses() error {
31 mod, err := NewModule("ipaddress")
32 if err != nil {
33 return err
34 }
35 if mod.IsNull() {
36 return errors.New("ipaddress module was not initialized")
37 }
38
39 ipaddressFn, err = mod.GetAttrString("ip_address")
40 if err != nil {
41 return err
42 }
43 ipv4Class, err = mod.GetAttrString("IPv4Address")
44 if err != nil {
45 return err
46 }
47 ipv6Class, err = mod.GetAttrString("IPv6Address")
48 if err != nil {
49 return err
50 }
51
52 return nil
53}

Callers 1

InitializeFunction · 0.85

Calls 3

NewModuleFunction · 0.85
IsNullMethod · 0.80
GetAttrStringMethod · 0.80

Tested by

no test coverage detected