nano: Index | Files

package env

import ""

env represents the environment of the current process, includes work path and config path etc.


Package Files



var (
    Wd                 string                   // working path
    Die                chan bool                // wait for end application
    Heartbeat          time.Duration            // Heartbeat internal
    CheckOrigin        func(*http.Request) bool // check origin when websocket enabled
    Debug              bool                     // enable Debug
    WSPath             string                   // WebSocket path(eg: ws://
    HandshakeValidator func([]byte) error       // When you need to verify the custom data of the handshake request

    // timerPrecision indicates the precision of timer, default is time.Second
    TimerPrecision = time.Second

    // globalTicker represents global ticker that all cron job will be executed
    // in globalTicker.
    GlobalTicker *time.Ticker

    Serializer serialize.Serializer

    GrpcOptions = []grpc.DialOption{grpc.WithInsecure()}

Package env imports 5 packages (graph). Updated 2021-01-20. Refresh now. Tools for package owners.