Home / File/ listen.go — fiber Source File

listen.go — fiber Source File

Architecture documentation for listen.go, a go file in the fiber codebase. 1 imports, 0 dependents.

File go FiberCore Routing 1 imports 5 functions 9 classes

Entity Profile

Dependency Diagram

graph LR
  5d4f872f_d638_4150_3260_9d03918ab7b6["listen.go"]
  cc7104af_aece_1fe5_3985_791c7f34910c["context"]
  5d4f872f_d638_4150_3260_9d03918ab7b6 --> cc7104af_aece_1fe5_3985_791c7f34910c
  style 5d4f872f_d638_4150_3260_9d03918ab7b6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
// 🤖 GitHub Repository: https://github.com/gofiber/fiber
// 📌 API Documentation: https://docs.gofiber.io

package fiber

import (
	"context"
	"crypto/tls"
	"crypto/x509"
	"fmt"
	"io"
	"net"
	"os"
	"path/filepath"
	"reflect"
	"runtime"
	"slices"
	"sort"
	"strings"
	"text/tabwriter"
	"time"

	"github.com/mattn/go-colorable"
	"github.com/mattn/go-isatty"
	"golang.org/x/crypto/acme/autocert"

	"github.com/gofiber/fiber/v3/log"
)

// Figlet text to show Fiber ASCII art on startup message
var figletFiberText = `
    _______ __
   / ____(_) /_  ___  _____
  / /_  / / __ \/ _ \/ ___/
 / __/ / / /_/ /  __/ /
/_/   /_/_.___/\___/_/          %s`

const (
	globalIpv4Addr = "0.0.0.0"
)

// ListenConfig is a struct to customize startup of Fiber.
type ListenConfig struct {
	// GracefulContext is a field to shutdown Fiber by given context gracefully.
	//
	// Default: nil
	GracefulContext context.Context `json:"graceful_context"` //nolint:containedctx // It's needed to set context inside Listen.

	// TLSConfigFunc allows customizing tls.Config as you want.
	//
	// Default: nil
	TLSConfigFunc func(tlsConfig *tls.Config) `json:"tls_config_func"`

	// TLSConfig allows providing a tls.Config used as the base for TLS settings.
	// This enables external certificate providers via GetCertificate.
	//
	// Default: nil
	TLSConfig *tls.Config `json:"tls_config"`

// ... (519 more lines)

Domain

Subdomains

Dependencies

  • context

Frequently Asked Questions

What does listen.go do?
listen.go is a source file in the fiber codebase, written in go. It belongs to the FiberCore domain, Routing subdomain.
What functions are defined in listen.go?
listen.go defines 5 function(s): addr, error, listenConfigDefault, printStartupEntries, tlsConfig.
What does listen.go depend on?
listen.go imports 1 module(s): context.
Where is listen.go in the architecture?
listen.go is located at listen.go (domain: FiberCore, subdomain: Routing).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free