Skip to content

Commit 83d7534

Browse files
committed
Update README.md
1 parent 103cc95 commit 83d7534

File tree

1 file changed

+5
-33
lines changed

1 file changed

+5
-33
lines changed

README.md

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ class GeneratorTest(GeneratingCommand):
213213

214214
#### Custom Search Commands
215215
* The service object is created from the Splunkd URI and session key passed to the command invocation the search results info file.
216-
* Generating Custom Search Command
216+
* Service object can be accessed using `self.service` in `generate`/`transform`/`stream`/`reduce` methods depending on the Custom Search Command.
217+
* For Generating Custom Search Command
217218
```python
218219
def generate(self):
219220
# other code
@@ -223,41 +224,12 @@ class GeneratorTest(GeneratingCommand):
223224
# to get Splunk Service Info
224225
info = service.info
225226
```
226-
* Eventing Custom Search Command
227-
```python
228-
def transform(self, records):
229-
# other code
230-
231-
# access service object that can be used to connect Splunk Service
232-
service = self.service
233-
# to get Splunk Service Info
234-
info = service.info
235-
```
236-
* Streaming Custom Search Command
237-
```python
238-
def stream(self, records):
239-
# other code
240-
241-
# access service object that can be used to connect Splunk Service
242-
service = self.service
243-
# to get Splunk Service Info
244-
info = service.info
245-
```
246-
* Reporting Custom Search Command
247-
```python
248-
def reduce(self, records):
249-
# other code
250-
251-
# access service object that can be used to connect Splunk Service
252-
service = self.service
253-
# to get Splunk Service Info
254-
info = service.info
255-
```
256-
* Service object can be accessed using `self.service` in `generate`/`transform`/`stream`/`reduce` methods depending on the Custom Search Command
227+
228+
257229

258230
#### Modular Inputs app:
259231
* The service object is created from the Splunkd URI and session key passed to the command invocation on the modular input stream respectively.
260-
* It is available as soon as the :code:`Script.stream_events` method is called.
232+
* It is available as soon as the `Script.stream_events` method is called.
261233
```python
262234
def stream_events(self, inputs, ew):
263235
# other code

0 commit comments

Comments
 (0)