<commit_before>package ari

// Client represents a set of operations to interact
// with an Asterisk ARI server.  It is agnostic to transport
// and implementation.
type Client struct {
	// Namespaced Interfaces
	Application Application
	Asterisk    Asterisk
	Channel     Channel
	Bridge      Bridge
	Playback    Playback
	Mailbox     Mailbox
	Endpoint    Endpoint
	DeviceState DeviceState
	TextMessage TextMessage
	Sound       Sound
	Recording   *Recording
	Bus         Bus

	// TODO: other interfaces
}<commit_msg>v3 - Add client.Closer and client.Close function for cleanup<commit_after>package ari

// Client represents a set of operations to interact
// with an Asterisk ARI server.  It is agnostic to transport
// and implementation.
type Client struct {
	// Namespaced Interfaces
	Application Application
	Asterisk    Asterisk
	Channel     Channel
	Bridge      Bridge
	Playback    Playback
	Mailbox     Mailbox
	Endpoint    Endpoint
	DeviceState DeviceState
	TextMessage TextMessage
	Sound       Sound
	Recording   *Recording
	Bus         Bus
	// TODO: other interfaces

	Cleanup func() error
}

// Close closes the client and calls any implementation specific cleanup code
func (cl *Client) Close() error {
	if cl.Cleanup != nil {
		return cl.Cleanup()
	}
	return nil
}
{'fraction_non_alphanumeric': 0.04698512137823023, 'fraction_numerical': 0.0007830853563038371, 'mean_word_length': 3.1359223300970873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6378252', 'n_tokens_mistral': 364, 'n_tokens_neox': 346, 'n_words': 141}