github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/outputs/websocket.md (about)

     1  ---
     2  title: websocket
     3  type: output
     4  status: stable
     5  categories: ["Network"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/output/websocket.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Sends messages to an HTTP server via a websocket connection.
    20  
    21  
    22  <Tabs defaultValue="common" values={[
    23    { label: 'Common', value: 'common', },
    24    { label: 'Advanced', value: 'advanced', },
    25  ]}>
    26  
    27  <TabItem value="common">
    28  
    29  ```yaml
    30  # Common config fields, showing default values
    31  output:
    32    label: ""
    33    websocket:
    34      url: ws://localhost:4195/post/ws
    35  ```
    36  
    37  </TabItem>
    38  <TabItem value="advanced">
    39  
    40  ```yaml
    41  # All config fields, showing default values
    42  output:
    43    label: ""
    44    websocket:
    45      url: ws://localhost:4195/post/ws
    46      tls:
    47        enabled: false
    48        skip_cert_verify: false
    49        enable_renegotiation: false
    50        root_cas: ""
    51        root_cas_file: ""
    52        client_certs: []
    53      oauth:
    54        enabled: false
    55        consumer_key: ""
    56        consumer_secret: ""
    57        access_token: ""
    58        access_token_secret: ""
    59        request_url: ""
    60      basic_auth:
    61        enabled: false
    62        username: ""
    63        password: ""
    64      jwt:
    65        enabled: false
    66        private_key_file: ""
    67        signing_method: ""
    68        claims: {}
    69  ```
    70  
    71  </TabItem>
    72  </Tabs>
    73  
    74  ## Fields
    75  
    76  ### `url`
    77  
    78  The URL to connect to.
    79  
    80  
    81  Type: `string`  
    82  Default: `"ws://localhost:4195/post/ws"`  
    83  
    84  ### `tls`
    85  
    86  Custom TLS settings can be used to override system defaults.
    87  
    88  
    89  Type: `object`  
    90  
    91  ### `tls.enabled`
    92  
    93  Whether custom TLS settings are enabled.
    94  
    95  
    96  Type: `bool`  
    97  Default: `false`  
    98  
    99  ### `tls.skip_cert_verify`
   100  
   101  Whether to skip server side certificate verification.
   102  
   103  
   104  Type: `bool`  
   105  Default: `false`  
   106  
   107  ### `tls.enable_renegotiation`
   108  
   109  Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`.
   110  
   111  
   112  Type: `bool`  
   113  Default: `false`  
   114  Requires version 3.45.0 or newer  
   115  
   116  ### `tls.root_cas`
   117  
   118  An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
   119  
   120  
   121  Type: `string`  
   122  Default: `""`  
   123  
   124  ```yaml
   125  # Examples
   126  
   127  root_cas: |-
   128    -----BEGIN CERTIFICATE-----
   129    ...
   130    -----END CERTIFICATE-----
   131  ```
   132  
   133  ### `tls.root_cas_file`
   134  
   135  An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
   136  
   137  
   138  Type: `string`  
   139  Default: `""`  
   140  
   141  ```yaml
   142  # Examples
   143  
   144  root_cas_file: ./root_cas.pem
   145  ```
   146  
   147  ### `tls.client_certs`
   148  
   149  A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both.
   150  
   151  
   152  Type: `array`  
   153  Default: `[]`  
   154  
   155  ```yaml
   156  # Examples
   157  
   158  client_certs:
   159    - cert: foo
   160      key: bar
   161  
   162  client_certs:
   163    - cert_file: ./example.pem
   164      key_file: ./example.key
   165  ```
   166  
   167  ### `tls.client_certs[].cert`
   168  
   169  A plain text certificate to use.
   170  
   171  
   172  Type: `string`  
   173  Default: `""`  
   174  
   175  ### `tls.client_certs[].key`
   176  
   177  A plain text certificate key to use.
   178  
   179  
   180  Type: `string`  
   181  Default: `""`  
   182  
   183  ### `tls.client_certs[].cert_file`
   184  
   185  The path to a certificate to use.
   186  
   187  
   188  Type: `string`  
   189  Default: `""`  
   190  
   191  ### `tls.client_certs[].key_file`
   192  
   193  The path of a certificate key to use.
   194  
   195  
   196  Type: `string`  
   197  Default: `""`  
   198  
   199  ### `oauth`
   200  
   201  Allows you to specify open authentication via OAuth version 1.
   202  
   203  
   204  Type: `object`  
   205  
   206  ### `oauth.enabled`
   207  
   208  Whether to use OAuth version 1 in requests.
   209  
   210  
   211  Type: `bool`  
   212  Default: `false`  
   213  
   214  ### `oauth.consumer_key`
   215  
   216  A value used to identify the client to the service provider.
   217  
   218  
   219  Type: `string`  
   220  Default: `""`  
   221  
   222  ### `oauth.consumer_secret`
   223  
   224  A secret used to establish ownership of the consumer key.
   225  
   226  
   227  Type: `string`  
   228  Default: `""`  
   229  
   230  ### `oauth.access_token`
   231  
   232  A value used to gain access to the protected resources on behalf of the user.
   233  
   234  
   235  Type: `string`  
   236  Default: `""`  
   237  
   238  ### `oauth.access_token_secret`
   239  
   240  A secret provided in order to establish ownership of a given access token.
   241  
   242  
   243  Type: `string`  
   244  Default: `""`  
   245  
   246  ### `oauth.request_url`
   247  
   248  The URL of the OAuth provider.
   249  
   250  
   251  Type: `string`  
   252  Default: `""`  
   253  
   254  ### `basic_auth`
   255  
   256  Allows you to specify basic authentication.
   257  
   258  
   259  Type: `object`  
   260  
   261  ### `basic_auth.enabled`
   262  
   263  Whether to use basic authentication in requests.
   264  
   265  
   266  Type: `bool`  
   267  Default: `false`  
   268  
   269  ### `basic_auth.username`
   270  
   271  A username to authenticate as.
   272  
   273  
   274  Type: `string`  
   275  Default: `""`  
   276  
   277  ### `basic_auth.password`
   278  
   279  A password to authenticate with.
   280  
   281  
   282  Type: `string`  
   283  Default: `""`  
   284  
   285  ### `jwt`
   286  
   287  BETA: Allows you to specify JWT authentication.
   288  
   289  
   290  Type: `object`  
   291  
   292  ### `jwt.enabled`
   293  
   294  Whether to use JWT authentication in requests.
   295  
   296  
   297  Type: `bool`  
   298  Default: `false`  
   299  
   300  ### `jwt.private_key_file`
   301  
   302  A file with the PEM encoded via PKCS1 or PKCS8 as private key.
   303  
   304  
   305  Type: `string`  
   306  Default: `""`  
   307  
   308  ### `jwt.signing_method`
   309  
   310  A method used to sign the token such as RS256, RS384 or RS512.
   311  
   312  
   313  Type: `string`  
   314  Default: `""`  
   315  
   316  ### `jwt.claims`
   317  
   318  A value used to identify the claims that issued the JWT.
   319  
   320  
   321  Type: `object`  
   322  Default: `{}`  
   323  
   324