optional

package
v0.0.0-...-404d2c9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache of Local

func NewCache

func NewCache(opts ...Option) *Cache

NewCache create a Cache with given options

type Option

type Option func(*Cache)

Option of cache settings

func WithBucketCount

func WithBucketCount(n uint64) Option

WithBucketCount set cache bucket count

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server for requests

func NewServer

func NewServer(opts ...ServerOption) *Server

NewServer create a Server instance

func (*Server) Start

func (s *Server) Start() error

Start run the server

type ServerOption

type ServerOption func(*Server)

ServerOption for Server settings

func WithHost

func WithHost(host string) ServerOption

WithHost set server host

func WithMaxConn

func WithMaxConn(count int) ServerOption

WithMaxConn set server max connection

func WithPort

func WithPort(port int) ServerOption

WithPort set server port

func WithTimeout

func WithTimeout(timeout time.Duration) ServerOption

WithTimeout set server timeout

Jump to

Keyboard shortcuts

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