httplogproxy

package module
v0.0.0-...-c165623 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 17 Imported by: 2

README

A http proxy that can log traffic to a file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeLogFile

func ChangeLogFile(logPath string)

ChangeLogFile changes name of log file

func CloseLogFile

func CloseLogFile()

CloseLogFile closes the log file

func Run

func Run(logPath string)

Run starts a proxy

Types

type BufferCloser

type BufferCloser struct {
	*bytes.Buffer
}

BufferCloser is a wrapper around bytes.Buffer that adds io.Close method to make it io.ReadCloser

func NewBufferCloser

func NewBufferCloser(buf *bytes.Buffer) *BufferCloser

NewBufferCloser creates new BufferClose

func (*BufferCloser) Close

func (b *BufferCloser) Close() error

Close implements io.Close interface

type SessionData

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

SessionData has info about a request/response session

func NewSessionData

func NewSessionData() *SessionData

Jump to

Keyboard shortcuts

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