package
0.0.0-20201111142942-4686cbe73efd
Repository: https://github.com/oniontree-org/go-oniontree.git
Documentation: pkg.go.dev

# README

Scanner

Scanner is a concurrent, configurable TCP scanner for OnionTree content.

Example

package main

import (
    "fmt"
    "context"
    "github.com/oniontree-org/go-oniontree"
    "github.com/oniontree-org/go-oniontree/scanner"
)

func main() {
    s := scanner.NewScanner(scanner.DefaultScannerConfig)

    eventCh := make(chan scanner.Event)

    go func(){
        if err := s.Start(context.TODO(), ".", eventCh); err != nil {
            panic(err)
        }
    }()

    for {
        select {
        case e := <-eventCh:
            switch event := e.(type) {
            case scanner.ScanEvent:
                fmt.Printf("%+v\n", event)
            }
        }
    }
}

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author