server

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

This file contains the server package's Run() function, config, and helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(conf *ServerConfig) (func(), error)

Run initializes and starts the gRPC server.

It takes a configuration struct as input. Returns a function to shut down the server and an error.

Types

type ServerConfig

type ServerConfig struct {
	KeepaliveInterval time.Duration `desc:"Interval at which to send keepalive pings to client" default:"60s" short:"k"`
	KeepaliveTimeout  time.Duration `desc:"Wait this duration for the ping ack before assuming the connection is dead" default:"10s" short:"t"`
	ListenAddress     string        `desc:"Address (host:port) at which to listen" default:"localhost:3144" short:"l"`
	TlsCert           string        `desc:"File containing TLS certificate" default:""`
	TlsKey            string        `desc:"File containing TLS key" default:""`
	ClientCertVerify  bool          `desc:"Verify client certificate" default:"false"`
	ClientCA          string        `desc:"File containing client CA certificate. This will also enable client cert verification." default:""`
	Password          string        `desc:"Password required of clients" default:""`
	locksrv.LockSrvConfig
}

The struct required to configure the server. See the config package

Directories

Path Synopsis
This file contains LockSrv methods for handling client connects and disconnects.
This file contains LockSrv methods for handling client connects and disconnects.
ipc
This file contains the IPC method definitions and implementations
This file contains the IPC method definitions and implementations
lockmap
This file contains LockMap struct definition and methods.
This file contains LockMap struct definition and methods.
lockmap/clientlock
This file contains the ClientLock struct definition and methods.
This file contains the ClientLock struct definition and methods.
lockmap/readwriter
This file contains the readWriter struct, its methods, and some helper functions related to serialization.
This file contains the readWriter struct, its methods, and some helper functions related to serialization.

Jump to

Keyboard shortcuts

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