idle

package
v1.58.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package idle contains a component for managing idleness (entering and exiting) based on RPC activity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcer

type Enforcer interface {
	ExitIdleMode() error
	EnterIdleMode() error
}

Enforcer is the functionality provided by grpc.ClientConn to enter and exit from idle mode.

type Manager

type Manager interface {
	OnCallBegin() error
	OnCallEnd()
	Close()
}

Manager defines the functionality required to track RPC activity on a channel.

func NewManager

func NewManager(opts ManagerOptions) Manager

NewManager creates a new idleness manager implementation for the given idle timeout.

type ManagerOptions

type ManagerOptions struct {
	Enforcer Enforcer
	Timeout  time.Duration
	Logger   grpclog.LoggerV2
}

ManagerOptions is a collection of options used by NewManager.

Jump to

Keyboard shortcuts

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