tools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const Timeout = 2 * time.Second

Timeout grpc dial timeout

Variables

This section is empty.

Functions

func DialInsecure

func DialInsecure(target string) (cConn *grpc.ClientConn, err error)

DialInsecure dial insecure grpc

func DialWithSecurity

func DialWithSecurity(
	target string,
	clientCert, clientKey, serverName, serverCa string,
) (cConn *grpc.ClientConn, err error)

DialWithSecurity dial grpc with security

func Watch

func Watch(logger *zap.Logger, path string, batchFor time.Duration, processEvent func()) (func(), error)

Watch watches the filesystem path `path`. When anything changes, changes are batched for the period `batchFor`, then `processEvent` is called.

Returns a cancel() function to terminate the watch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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