sdk

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(h http.Handler, opts ...OptFunc) error

Handle connects to the gRPC Fleet server, managing the proxied request using the provided HTTP handler.

func HandleWithCtx

func HandleWithCtx(ctx context.Context, h http.Handler, opts ...OptFunc) error

HandleWithCtx is similar to Handle but supports passing a context.

Types

type OptFunc

type OptFunc func(*opts)

func WithPathToCACertificate

func WithPathToCACertificate(path string) OptFunc

WithPathToCACertificate sets the path to the CA's TLS certficiate file.

Defaullt: ./certs/ca-cert.pem

func WithPreferredSubdomain

func WithPreferredSubdomain(name string) OptFunc

WithPreferredSubdomain requests the server to register the client on the given subdomain.

func WithRPCAddress

func WithRPCAddress(addr string) OptFunc

WithRPCAddress sets the address of the gRPC server.

Default: 127.0.0.1:2305

func WithTLS

func WithTLS() OptFunc

WithTLS sets the client to use TLS for connecting to the gRPC server.

Default: false

Jump to

Keyboard shortcuts

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