api

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 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 {

	// protects stream
	sync.Mutex
	// contains filtered or unexported fields
}

Client provides a simple Buoyant Cloud API client.

func NewClient

func NewClient(client pb.ApiClient) *Client

NewClient instantiates a new Buoyant Cloud API client.

func (*Client) AddEvent

func (c *Client) AddEvent(event *pb.Event) error

AddEvent wraps the Buoyant Cloud API AddEvent gRPC unary endpoint.

func (*Client) AgentCommands added in v0.4.1

func (c *Client) AgentCommands() <-chan *pb.AgentCommand

func (*Client) AuthPolicyInfo added in v0.5.0

func (c *Client) AuthPolicyInfo(info *pb.AuthPolicyInfo) error

func (*Client) CrtInfo added in v0.2.0

func (c *Client) CrtInfo(info *pb.CertificateInfo) error

func (*Client) MCInfo added in v0.5.0

func (c *Client) MCInfo(info *pb.MulticlusterInfo) error

func (*Client) ProxyDiagnostics added in v0.4.1

func (c *Client) ProxyDiagnostics(
	diagnosticID string,
	logs []byte,
	metrics [][]byte,
	podManifest *pb.Pod,
	linkerdConfigMap *pb.ConfigMap,
	nodes []*pb.Node,
	k8sServiceManifest *pb.Service) error

ProxyDiagnostics wraps the Buoyant Cloud API ProxyDiagnostics gRPC unary endpoint.

func (*Client) ProxyLogs added in v0.4.1

func (c *Client) ProxyLogs(
	podName string,
	namespace string,
	logs []byte) error

ProxyLogs wraps the Buoyant Cloud API ProxyLogs gRPC unary endpoint.

func (*Client) SPInfo added in v0.5.0

func (c *Client) SPInfo(info *pb.ServiceProfileInfo) error

func (*Client) SendWorkloadMessage added in v0.4.1

func (c *Client) SendWorkloadMessage(msg *pb.WorkloadMessage) error

SendWorkloadMessage sends a message via the Buoyant Cloud API WorkloadStream gRPC endpoint. It abstracts away the details around managing and protecting the client-side stream

func (*Client) Start added in v0.4.1

func (c *Client) Start()

func (*Client) TrafficSplitInfo added in v0.5.0

func (c *Client) TrafficSplitInfo(info *pb.TrafficSplitInfo) error

type MockAPI_ManageAgentClient added in v0.4.1

type MockAPI_ManageAgentClient struct {
	grpc.ClientStream

	// protects state
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MockAPI_ManageAgentClient) CloseSend added in v0.4.1

func (c *MockAPI_ManageAgentClient) CloseSend() error

func (*MockAPI_ManageAgentClient) Recv added in v0.4.1

type MockBcloudClient

type MockBcloudClient struct {

	// protects messages and events
	sync.Mutex
	// contains filtered or unexported fields
}

MockBcloudClient satisfies the bcloud.ApiClient and bcloud.Api_WorkloadStreamClient interfaces, and saves all params and messages passed to it.

func (*MockBcloudClient) AddEvent

func (m *MockBcloudClient) AddEvent(
	ctx context.Context, event *pb.Event, _ ...grpc.CallOption,
) (*pb.Empty, error)

func (*MockBcloudClient) CloseAndRecv

func (m *MockBcloudClient) CloseAndRecv() (*pb.Empty, error)

func (*MockBcloudClient) CloseSend

func (m *MockBcloudClient) CloseSend() error

func (*MockBcloudClient) Context

func (m *MockBcloudClient) Context() context.Context

func (*MockBcloudClient) Events

func (m *MockBcloudClient) Events() []*pb.Event

func (*MockBcloudClient) Header

func (m *MockBcloudClient) Header() (metadata.MD, error)

func (*MockBcloudClient) LinkerdInfo added in v0.2.0

func (m *MockBcloudClient) LinkerdInfo(
	ctx context.Context, message *pb.LinkerdMessage, _ ...grpc.CallOption,
) (*pb.Empty, error)

func (*MockBcloudClient) LinkerdMessages added in v0.2.0

func (m *MockBcloudClient) LinkerdMessages() []*pb.LinkerdMessage

func (*MockBcloudClient) ManageAgent added in v0.4.1

func (m *MockBcloudClient) ManageAgent(
	ctx context.Context, auth *pb.Auth, opts ...grpc.CallOption) (pb.Api_ManageAgentClient, error)

func (*MockBcloudClient) Messages

func (m *MockBcloudClient) Messages() []*pb.WorkloadMessage

func (*MockBcloudClient) ProxyDiagnosticMessages added in v0.4.1

func (m *MockBcloudClient) ProxyDiagnosticMessages() []*pb.ProxyDiagnostic

func (*MockBcloudClient) ProxyDiagnostics added in v0.4.1

func (m *MockBcloudClient) ProxyDiagnostics(ctx context.Context, message *pb.ProxyDiagnostic, opts ...grpc.CallOption) (*pb.Empty, error)

func (*MockBcloudClient) ProxyLogs added in v0.4.1

func (m *MockBcloudClient) ProxyLogs(ctx context.Context, message *pb.ProxyLog, opts ...grpc.CallOption) (*pb.Empty, error)

func (*MockBcloudClient) ProxyLogsMessages added in v0.4.1

func (m *MockBcloudClient) ProxyLogsMessages() []*pb.ProxyLog

func (*MockBcloudClient) RecvMsg

func (m *MockBcloudClient) RecvMsg(_ interface{}) error

func (*MockBcloudClient) Send

func (m *MockBcloudClient) Send(msg *pb.WorkloadMessage) error

func (*MockBcloudClient) SendMsg

func (m *MockBcloudClient) SendMsg(_ interface{}) error

func (*MockBcloudClient) Trailer

func (m *MockBcloudClient) Trailer() metadata.MD

func (*MockBcloudClient) WorkloadStream

func (m *MockBcloudClient) WorkloadStream(
	ctx context.Context, _ ...grpc.CallOption,
) (pb.Api_WorkloadStreamClient, error)

Jump to

Keyboard shortcuts

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