Documentation ¶
Overview ¶
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func CreateTLSConfiguration(certString, keyString string) (*tls.Config, error)
- func ListenAndServeTLS(address string, handler http.Handler, cert, key string) error
- func MultiCloser(closers ...io.Closer) *multiCloser
- func ObjectToStruct(in interface{}, out interface{}) error
- func ReadPath(path string) ([]byte, error)
- func SplitReaders(r1 io.Reader, r2 io.Reader) io.Reader
- func StartHTTPServer(addr NetAddr, h http.Handler) error
- func WriteArchive(root_directory string, w io.Writer) error
- type Clock
- type FileNode
- type MemoryListener
- type NOPEventLogger
- type NetAddr
- type NetAddrList
- type NetAddrVal
- type PipeNetConn
- func (nc *PipeNetConn) Close() error
- func (nc *PipeNetConn) LocalAddr() net.Addr
- func (nc *PipeNetConn) Read(buf []byte) (n int, e error)
- func (nc *PipeNetConn) RemoteAddr() net.Addr
- func (nc *PipeNetConn) SetDeadline(t time.Time) error
- func (nc *PipeNetConn) SetReadDeadline(t time.Time) error
- func (nc *PipeNetConn) SetWriteDeadline(t time.Time) error
- func (nc *PipeNetConn) Write(buf []byte) (n int, e error)
- type TestClock
- type WallClock
Constants ¶
const DefaultLRUCapacity = 1024
Variables ¶
var NullEventLogger lunk.EventLogger = &NOPEventLogger{}
var RealTime = &WallClock{}
Functions ¶
func CreateTLSConfiguration ¶
func ListenAndServeTLS ¶
func MultiCloser ¶
MultiCloser implements io.Close, it sequentially calls Close() on each object
func ObjectToStruct ¶
func ObjectToStruct(in interface{}, out interface{}) error
Types ¶
type MemoryListener ¶
type MemoryListener struct {
// contains filtered or unexported fields
}
Memory listener implements net.Listener using net.Conn
func NewMemoryListener ¶
func NewMemoryListener() *MemoryListener
func (*MemoryListener) Addr ¶
func (ml *MemoryListener) Addr() net.Addr
func (*MemoryListener) Close ¶
func (ml *MemoryListener) Close() error
type NOPEventLogger ¶
type NOPEventLogger struct { }
type NetAddr ¶
func (*NetAddr) FullAddress ¶
FullAddress returns full address including network and address (tcp://0.0.0.0:1243)
func (*NetAddr) UnmarshalYAML ¶
type NetAddrList ¶
type NetAddrList struct {
// contains filtered or unexported fields
}
func NewNetAddrList ¶
func NewNetAddrList(addrs *[]NetAddr) *NetAddrList
func (*NetAddrList) Set ¶
func (nl *NetAddrList) Set(s string) error
func (*NetAddrList) String ¶
func (nl *NetAddrList) String() string
type NetAddrVal ¶
type NetAddrVal NetAddr
NetAddrVal can be used with flag package
func NewNetAddrVal ¶
func NewNetAddrVal(defaultVal NetAddr, val *NetAddr) *NetAddrVal
func (*NetAddrVal) Get ¶
func (a *NetAddrVal) Get() interface{}
func (*NetAddrVal) Set ¶
func (a *NetAddrVal) Set(s string) error
func (*NetAddrVal) String ¶
func (a *NetAddrVal) String() string
type PipeNetConn ¶
type PipeNetConn struct {
// contains filtered or unexported fields
}
PipeNetConn implemetns net.Conn from io.Reader,io.Writer and io.Closer
func NewPipeNetConn ¶
func (*PipeNetConn) Close ¶
func (nc *PipeNetConn) Close() error
func (*PipeNetConn) LocalAddr ¶
func (nc *PipeNetConn) LocalAddr() net.Addr
func (*PipeNetConn) RemoteAddr ¶
func (nc *PipeNetConn) RemoteAddr() net.Addr
func (*PipeNetConn) SetDeadline ¶
func (nc *PipeNetConn) SetDeadline(t time.Time) error
func (*PipeNetConn) SetReadDeadline ¶
func (nc *PipeNetConn) SetReadDeadline(t time.Time) error
func (*PipeNetConn) SetWriteDeadline ¶
func (nc *PipeNetConn) SetWriteDeadline(t time.Time) error