client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClientTypeSource represents the client type of Source.
	ClientTypeSource = "source"

	// ClientTypeServerless represents the client type of Serverless.
	ClientTypeServerless = "serverless"

	// ClientTypeZipperSender represents the client type of ZipperSender.
	ClientTypeZipperSender = "zipper-sender"
)

Variables

View Source
var (
	// SignalHeartbeat represents the signal of Heartbeat.
	SignalHeartbeat = []byte{0}

	// SignalAccepted represents the signal of Accpeted.
	SignalAccepted = []byte{1}

	// SignalFlowSink represents the signal for flow/sink.
	SignalFlowSink = []byte{0, 0}
)

Functions

This section is empty.

Types

type NegotiationPayload added in v1.3.0

type NegotiationPayload struct {
	AppName    string `json:"app_name"`
	ClientType string `json:"client_type"`
}

NegotiationPayload represents the payload for negotiation.

type ServerlessClient

type ServerlessClient interface {

	// Connect to YoMo-Zipper
	Connect(ip string, port int) (ServerlessClient, error)

	// Pipe the Handler function.
	Pipe(f func(rxstream rx.RxStream) rx.RxStream)
	// contains filtered or unexported methods
}

ServerlessClient is the client for YoMo-Serverless.

func NewServerless

func NewServerless(appName string) ServerlessClient

NewServerless setups the client of YoMo-Serverless. The "appName" should match the name of flows (or sinks) in workflow.yaml in zipper.

type SourceClient

type SourceClient interface {

	// Connect to YoMo-Zipper
	Connect(ip string, port int) (SourceClient, error)
	// contains filtered or unexported methods
}

SourceClient is the client for YoMo-Source. https://yomo.run/source

func NewSource

func NewSource(appName string) SourceClient

NewSource setups the client of YoMo-Source.

type ZipperSenderClient added in v1.3.0

type ZipperSenderClient interface {

	// Connect to downsteam Zipper-Receiver
	Connect(ip string, port int) (ZipperSenderClient, error)
	// contains filtered or unexported methods
}

ZipperSenderClient is the client for Zipper-Sender to connect the downsteam Zipper-Receiver in edge-mesh.

func NewZipperSender added in v1.3.0

func NewZipperSender(appName string) ZipperSenderClient

NewZipperSender setups the client of Zipper-Sender.

Jump to

Keyboard shortcuts

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