grpshuffle_client

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatJson       = "json"
	FormatJsonPretty = "json-pretty"
	FormatReadable   = "readable"
)

Variables

View Source
var (
	Host  string // Host is host of grpshuffle server
	Port  int    // Port is port of grpshuffle server
	NoTLS bool   // NoTLS disables TLS
)

Functions

func CloseConnect

func CloseConnect(conn *grpc.ClientConn)

CloseConnect is close grpc.ClientConn

func Connect

func Connect(host string, port int, noTls bool) (conn *grpc.ClientConn, err error)

Connect is create grpc.ClientConn

func HttpServe

func HttpServe(port int)

HttpServe is serve http server for grpshuffle-client

func Shuffle

func Shuffle(cc *grpshuffle.ComputeClient, divide uint64, targets []string) ([]*grpshuffle.Combination, error)

Shuffle is request to grpshuffle.ComputeClient

Types

type HealthCheckResponse

type HealthCheckResponse struct {
	Status string `json:"status"`
}

HealthCheckResponse is response HealthCheck

func HealthCheck

func HealthCheck(hc *health.HealthClient) (*HealthCheckResponse, error)

HealthCheck is request to grpc_health_v1.HealthClient

type HttpResponse

type HttpResponse struct {
	Status int         `json:"status"`
	Msg    string      `json:"msg"`
	Result interface{} `json:"result"`
}

HttpResponse is response http server for grpshuffle-client

type ResponseFormat added in v0.0.10

type ResponseFormat string

Jump to

Keyboard shortcuts

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