socket
Socket Builder 🏗️
Builder for the socket
section of a systemd service file.
SocketBuilder
Bases: _Builder
Builder for the socket
section of a systemd service file.
Source code in systemd_py/builders/socket.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
allowed_none_fields: List[str]
property
Returns a list of fields that are allowed to be None
Returns:
Type | Description |
---|---|
List[str]
|
List of fields that are allowed to be None |
build()
Builds the socket
section of a systemd service file.
Returns:
Type | Description |
---|---|
Socket
|
The |
Source code in systemd_py/builders/socket.py
with_accept(accept)
Sets the accept
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
accept |
bool
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_listen_datagram(listen_datagram)
Sets the listen_datagram
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
listen_datagram |
List[str]
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_listen_fifo(listen_fifo)
Sets the listen_fifo
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
listen_fifo |
List[str]
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_listen_sequential_packet(listen_sequential_packet)
Sets the listen_sequential_packet
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
listen_sequential_packet |
List[str]
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_listen_stream(listen_stream)
Sets the listen_stream
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
listen_stream |
List[str]
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_service(service)
Sets the service
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service |
str
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_socket_group(socket_group)
Sets the socket_group
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
socket_group |
str
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_socket_mode(socket_mode)
Sets the socket_mode
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
socket_mode |
str
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |
Source code in systemd_py/builders/socket.py
with_socket_user(socket_user)
Sets the socket_user
field of the socket
section of a systemd service file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
socket_user |
str
|
The |
required |
Returns:
Type | Description |
---|---|
SocketBuilder
|
The SocketBuilder object |