client

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID     string
	Weight int
	// contains filtered or unexported fields
}

func New

func (*Client) AddLogLines

func (nc *Client) AddLogLines(ctx context.Context, lines ...*logspb.LogLine) error

func (*Client) BroadcastCommand

func (nc *Client) BroadcastCommand(ctx context.Context, command string) error

func (*Client) DownloadFile

func (nc *Client) DownloadFile(ctx context.Context, info *fspb.FileInfo, out io.Writer) error

func (*Client) Exploit

func (nc *Client) Exploit(ctx context.Context, id string) (*epb.ExploitResponse, error)

func (*Client) GetServerState

func (nc *Client) GetServerState(ctx context.Context) (*epb.ServerState, error)

func (*Client) Heartbeat

func (nc *Client) Heartbeat(ctx context.Context) (*epb.ServerState, error)

func (*Client) Leave

func (nc *Client) Leave(ctx context.Context) error

func (*Client) ListenBroadcasts

func (nc *Client) ListenBroadcasts(ctx context.Context) (<-chan *epb.BroadcastSubscribeResponse, error)

func (*Client) ListenSingleRuns

func (nc *Client) ListenSingleRuns(ctx context.Context) (<-chan *epb.SingleRunSubscribeResponse, error)

func (*Client) SearchLogLines

func (nc *Client) SearchLogLines(ctx context.Context, exploit string, version int64) (<-chan []*logspb.LogLine, error)

func (*Client) SetExploitDisabled

func (nc *Client) SetExploitDisabled(ctx context.Context, id string, disabled bool) error

func (*Client) SingleRun

func (nc *Client) SingleRun(ctx context.Context, exploitID string) error

func (*Client) UpdateExploit

func (nc *Client) UpdateExploit(ctx context.Context, state *epb.ExploitState) (*epb.ExploitState, error)

func (*Client) UploadFile

func (nc *Client) UploadFile(ctx context.Context, r io.Reader) (*fspb.FileInfo, error)

type Config

type Config struct {
	Host        string `mapstructure:"host"`
	MetricsHost string `mapstructure:"metrics_host"`
	ExploitDir  string `mapstructure:"exploit_dir"`
	GrpcAuthKey string `mapstructure:"grpc_auth_key"`
	UseTLS      bool   `mapstructure:"use_tls"`
}

func MustUnmarshalConfig

func MustUnmarshalConfig() *Config

Jump to

Keyboard shortcuts

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