client

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper for the gRPC connection it allows to connect to a Falco gRPC server. It is created using the function NewForConfig(config *Config) .

Example

The simplest use of a Client, just create and Close it.

Output:

Example (OutputSubscribe)

A client that is created and then used to Subscribe to Falco output events

Output:

Example (Version)
Output:

func NewForConfig

func NewForConfig(config *Config) (*Client, error)

NewForConfig is used to create a new Falco gRPC client.

func (*Client) Close

func (c *Client) Close() error

Close the connection to the falco gRPC server.

func (*Client) Output

func (c *Client) Output() (output.ServiceClient, error)

Output is the client for Falco Outputs. When using it you can use `subscribe()` to receive a stream of Falco output events.

func (*Client) Version

func (c *Client) Version() (version.ServiceClient, error)

Version it the client for Falco Version API. When using it you can use `version()` to receive the Falco version.

type Config

type Config struct {
	Hostname   string
	Port       uint16
	CertFile   string
	KeyFile    string
	CARootFile string
}

Config is the configuration definition for connecting to a Falco gRPC server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL