Giter Site home page Giter Site logo

kit's Introduction

Kit Build Status

A set of common packages for building applications in Go.

This code has been developed for use in Ultimate Go training classes and client projects. We will be working hard to maintain backwards compatibility with each package's API. A proper set of documentation is required and we will be working on this as well.

You should be vendoring the packages you choose to use. We recommend using govendor. This tool will vendor from the vendor folder associated with this project repo for the dependencies in use. It is recommended to use a project based repo with a single vendor folder for all your dependencies.

If you have any questions about vendoring or the use of these packages, please send me an email.

[email protected]
-- Bill

kit's People

Contributors

abeltay avatar ardan-bkennedy avatar dwhitena avatar influx6 avatar jcbwlkr avatar mkurrels avatar wyattjoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kit's Issues

Add support to cfg to manually add config values

We have the map provider which is great for adding configuration during tests but it would be nice to have the ability to manually add key values of a specified type to the configuration map.

Occasional race condition with tests subpackage

I have noticed a number of times in use of the Kit tests subpackage that there exists a race when using tests.ResetLog() and tests.DisplayLog(), especially when parrallel tests are allowed, we need to wrap those calls with mutex to avoid such a case.

Config mutex locking error

Why do you lock mutex for reading in Set... methods?

func (c *Config) SetString(key string, value string) {
	c.mu.RLock()
	{
		c.m[key] = value
	}
	c.mu.RUnlock()
}

is this copypast?

Resolve configurability with CORS() option on Web

Currently calling web.CORS() will wildcard all domains. If we plan on using this functionality for exposing external tools, we need to be able to configure those domains specifically. Suggestion:

web.CORS(options)

Proxy should not copy downstream headers to response.

Currently, a request is made as such:

client -> proxy -> downstream service

Where the proxy is a service using c.Proxy, it will copy the downstream service headers onto the response to client. This should not occur for all headers, and should instead be blacklisted if already specified on the response writer.

Resolve issue with build server

Currently the build fails as a result of missing dependancies. The build server should fetch the latest build dependancies to test with.

TCP example : Echo - but what would the right practice be if you wanted to change to a chat server ?

The example provided is an echo server - but what if i wanted to change it into a 'chat server' - that would send data from one client to all other connected clients than the one that sent the data ?

Am unsure how it should be structured correctly :


		// Convert the IP:socket for populating TCPAddr value.
		parts := bytes.Split([]byte(c.ipAddress), []byte(":"))
		ipAddress := string(parts[0])
		port, _ := strconv.Atoi(string(parts[1]))

		// Create the request.
		r := Request{
			TCP: c.t,
			TCPAddr: &net.TCPAddr{
				IP:   net.ParseIP(ipAddress),
				Port: port,
				Zone: c.t.tcpAddr.Zone,
			},
			IsIPv6:  c.isIPv6,
			ReadAt:  c.lastAct,
			Context: context.Background(),
			Data:    data,
			Length:  length,
		}

		// Process the request on this goroutine that is
		// handling the socket connection.
		c.t.ReqHandler.Process(&r)

Process() is where it calls the routine that in the end will send to that specific client - but if i instead looped through all clients that was not the sending client calling process on each of them something im not sure if that is the correct way ?

any ideas on how i would need to that the correct way ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.