// Available returns how many bytes are unused in the buffer.
166642
func (stream *Stream) Available() int {
	return cap(stream.buf) - len(stream.buf)
}
1061561
func (s *sharedPullerState) AvailableUpdated() time.Time {
	s.mut.RLock()
	t := s.availableUpdated
	s.mut.RUnlock()
	return t
}
284919
func (cp *ConnectionPool) Available() int64 {
	p := cp.pool()
	if p == nil {
		return 0
	}
	return p.Available()
}
1129584
func (wb *Webhooks) AvailableWebhooks() []Webhook {
	webhooks := make([]Webhook, 0)
	s := reflect.ValueOf(wb).Elem()
	for i := 0; i < s.NumField(); i++ {
		f := s.Field(i)

		if !f.CanInterface() {
			continue
		}

		if wbPlugin, ok := f.Interface().(Webhook); ok {
			if !reflect.ValueOf(wbPlugin).IsNil() {
				webhooks = append(webhooks, wbPlugin)
			}
		}
	}

	return webhooks
}
1011842
func (s *Stream) AvailableToRead() (int, error) {
	n := C.Pa_GetStreamReadAvailable(s.paStream)
	if n < 0 {
		return 0, newError(C.PaError(n))
	}
	return int(n), nil
}
694756
func (c *guiCommand) checkAvailable(rawURL, newRawURL string, conn api.Connection) (string, error) {
	client, err := conn.HTTPClient()
	if err != nil {
		return "", errors.Annotate(err, "cannot retrieve HTTP client")
	}
	if err = clientGet(client, newRawURL); err == nil {
		return newRawURL, nil
	}
	if err = clientGet(client, rawURL); err != nil {
		return "", errors.Annotate(err, "Juju GUI is not available")
	}
	return rawURL, nil
}
65419
func (s *sharedPullerState) Available() []int32 {
	s.mut.RLock()
	blocks := s.available
	s.mut.RUnlock()
	return blocks
}
815110
func (c *CmdListTrackers) GetUsage() libkb.Usage {
	return libkb.Usage{
		Config: true,
		API:    true,
	}
}
125051
func (m *pool) Capacity() int {
	masked, total := m.dynamicRange.Mask.Size()
	return int(math.Pow(2, float64(total-masked)) / 4)
}
313457
func (stream *AudioStream) Available() (err error) {
	ret := int(C.SDL_AudioStreamAvailable(stream.cptr()))
	err = errorFromInt(ret)
	return
}
393838
func (rd *RAMDirectory) RamBytesUsed() int64 {
	rd.EnsureOpen()
	return atomic.LoadInt64(&rd.sizeInBytes)
}
1225691
func (nc *Conn) Buffered() (int, error) {
	nc.mu.RLock()
	defer nc.mu.RUnlock()
	if nc.isClosed() || nc.bw == nil {
		return -1, ErrConnectionClosed
	}
	return nc.bw.Buffered(), nil
}
630298
func (s *Server) Available(stop <-chan struct{}) {
	s.cur = s.api
	<-stop
	s.cur = unavailable
}
1204235
func getAvailableFromCurrent(head *sequence, start, curr, end uint64) (uint64, uint64, error) {
	var bytePos, bitPos uint64
	var err error
	if curr != 0 && curr > start {
		bytePos, bitPos, err = getFirstAvailable(head, curr)
		ret := posToOrdinal(bytePos, bitPos)
		if end < ret || err != nil {
			goto begin
		}
		return bytePos, bitPos, nil
	}

begin:
	bytePos, bitPos, err = getFirstAvailable(head, start)
	ret := posToOrdinal(bytePos, bitPos)
	if end < ret || err != nil {
		return invalidPos, invalidPos, ErrNoBitAvailable
	}
	return bytePos, bitPos, nil
}
817525
func (b *BufReader) Buffered() int {
	d := b.w - b.r
	if b.available != -1 && d > b.available {
		return b.available
	}
	return d
}
609891
func (p *DB) Capacity() int {
	p.mu.RLock()
	defer p.mu.RUnlock()
	return cap(p.kvData)
}
808589
func AvailableCodecs() []string {
	ans := make([]string, 0, len(allCodecs))
	for name, _ := range allCodecs {
		ans = append(ans, name)
	}
	return ans
}